ok about loading the mesh and textures, usually i do something like
this: (i use my models from 3ds xd)

var myLoader:Object3DLoader;
var myModel:ObjectContainer3D;

        myLoader = Max3DS.load("assets/myModel.3ds",
{material:myModelMaterial, ownCanvas:true, centerMeshes:true,
pushfront:true});
        myLoader.addOnSuccess(XXX);
        scene.addChild(myLoader);

and in the function XXX i put what i want to be done when it loads the
texture. in this case the model attributes, or functions or stuff like
that, i think this is a very simple way to send secuencial acts with
your models, not sure how it works with primitives or Mesh, cause i
have to read who extends who, and that, im handing over the answer to
a dev, cause in fact im asking the same now XD (its contagious ur
question mr NighterNet)


On Apr 20, 10:06 am, NighterNet <[email protected]> wrote:
> Well I am trying to get the mesh and material loaded differently and
> wait until it fully loaded. Then I be assigning mesh to a materials.
> Next it to clone and build the map once all data is loaded. I am
> trying to create map format for xml. To able to read and save map
> format.
>
> On Apr 20, 7:06 am, desgraci <[email protected]> wrote:
>
> > 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-f...
> > 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. (?)
>
> > On Apr 19, 1:04 pm, NighterNet <[email protected]> wrote:
>
> > > I need help on how to loaded multi files and making sure it fully load
> > > and ready to be clone. I am trying to building a map editor to ease
> > > some area. Not sure how code the right way.

Reply via email to