Hello guys from Away3d!
Your engine is amazing, thank you for your work!
I´ve got an issue with implementing a preloader in my scene. Googling
didn´t get me no further. For there are just a few search results it
makes me believe this is a simple thing. Maybe I´ve overlooked
something simple?
To get you in the picture:
main.swf is loading external parent.swf with a child_mc that contains
the 3d stuff
I want to set up a preloader in the child_mc that is reacting to the
objects and materials to be loaded.
For now I made the preloader listen to one of the objects (other
objects and materials as well should be recognized, too..but for now I
need to know the basic way of doing it right)
With this part of code I get the 1009 error. If you need more code/
information, please ask.
This is the (part of) code so far:
preloader part:
var object_loaded:int;
var object_total:int;
function onProgress(event:Loader3DEvent):void
{
object_loaded = (event as ProgressEvent).bytesLoaded;
object_total = (event as ProgressEvent).bytesTotal;
trace (object_loaded);
}
object part:
// scene.addChild(deckflaeche);
max3ds = new Max3DS();
max3ds.centerMeshes = true;
max3ds.material = materialArray[materialIndex];
deckflaeche = new Loader3D();
deckflaeche.addEventListener(Loader3DEvent.LOAD_PROGRESS,
onProgress);
deckflaeche.loadGeometry("http://www.wirr-warr.de/box/deckflaeche.
3ds", max3ds);
scene.addChild(deckflaeche);
Thank you!