Which way yoiu want to load them? i think you should explain in a more
comprehesive way what are you trying to do.
What i can think off imho, its to load the files to classes at the
very begining of the code, like when you have this:
function init():void
{
initEngine();
initMaterials();
initLights();
initObjects();
initButtons();
initListeners();
}
at initMaterials(){
//load your files here
}
or at the init, if u have, (i made that one time because the fies were
too big ^^, but just for one element XD so the user wont get a white
screen)
Or, if what u want is to load multiple assets without overcharging
your .swf u can use for sure the BitmapFileMAterial
var var1M:BitmapFileMaterial;
.
.
.
var varnM:BitmapFileMaterial;
var1M = new BitmapFileMaterial("./assets/XX1.JPG");
.
.
.
.
varnM = new BitmapFileMaterial("./assets/XXn.JPG");
Now if that doesnt solve ur problem, lets say u want to load a file
type .docx or stuff like that, well, i suggest to make with in Flex
components and the link them to the away engine.
http://www.switchonthecode.com/tutorials/getting-started-with-adobe-flex-and-away3d
or google it :s
NOW, if that doesnt help u, im really lost then XD
btw i was looking for that about the loading, i couldnt find info, in
fact i was trying to make a code but , well look:
funciont 1 (whatever, on click, over, front/behind :D ){
M1= new BitmapFileMaterial("./assets/1.JPG");
M2= new BitmapFileMaterial("./assets/2.JPG");
M3= new BitmapFileMaterial("./assets/3n.JPG");
M4= new BitmapFileMaterial("./assets/4.JPG");
M5= new BitmapFileMaterial("./assets/5.JPG");
M6= new BitmapFileMaterial("./assets/6.JPG");
myCube= new Cube ( {width:128, height:128, depth:128,faces:{front:M1,
back:M2, top:M3, bottom:M4,right:M5, left:M6} } );
// myCube.addOnSuccess(Charged);
/*
ok heres te mistake this addOnSucces i think is for a model, case like
3ds class, theres one for the cube?
*/
}
function Cargo(event:LoaderEvent)
{
//blah blah your code here
}
So i came up with that question also, theres a way to tell the engine,
hey u just finished loaded the materials, now do something. (?)