Hello,
how to add eventListener to a mesh or to a material when it had been added to stage?
for example:
private function initObjects():void
{
max3ds = new Max3DS();
max3ds.centerMeshes = true;
max3ds.material = materialArray[materialIndex];
loader = new LoaderCube();
loader.loaderSize = 200;
loader.addOnSuccess(onSuccess);
loader.loadGeometry("assets/f360.3ds", max3ds);
scene.addChild(loader);
loader.addEventListener(Event.ADDED_TO_STAGE, onAdded);
}
private function onAdded(e:Event):void
{
trace("added");
}
“onAdded” doesn’t work in this way