Im trying to follow this method…
http://www.allforthecode.co.uk/aftc/forum/user/modules/forum/article.php?index=5&subindex=5&aid=320
Using LoaderMax class…
var preloader = new LoaderMax( {
name:“test”,
maxConnections:5,
auditSize:true,
onComplete:loadComplete
} );
preloader.append(new ImageLoader(“imagens/superficie_difuse_grama.jpg”,{name:“textura”,estimatedBytes:(221*1024)}));
preloader.load();
So i get this:
TypeError: Error #1034: coercion fail: can not convert com.greensock.events :: LoaderEvent @ 1ab7f159 in away3d.events.LoaderEvent.
I imagine that there is incompatibility between the latest versions of LoaderMax and Away3D ... perhaps using the same function name.
I build this:
var imagem:Texture2DBase = new BitmapTexture(imagemLoader.rawContent.bitmapData);
var superficieMaterial = new TextureMaterial(Cast.bitmapTexture(imagem),true,false,true);
So, I must put a image inside imagemLoader variable.
How else could I load an image into the variable imagemLoader?
I tried the method of standard loader but did not work.
As I am not accustomed to build using .as files. Them, is a challenge to adapt some parts of the code.