Jump to content
Search Community

Problem with loading a sheet of videos / onChildComplete

jaylerd test
Moderator Tag

Recommended Posts

I am using LoaderMax to load in an xml sheet:

 

_vidQueue =  new LoaderMax( { name:"vidQueue", onChildComplete:handleLoaderEvents } );
_vidQueue.append( new XMLLoader("xml/videos.xml", { name:"videosXML" } ));
_vidQueue.load()

 

inside of that XML are a number of VideoLoaders formatted thusly

 


 

My loader has an onChildComplete listener, but only fires once, regardless of how many video loaders are in the XML.

 

What do I need to do so that a COMPLETE event fires when each individual FLV has completed loading? I cannot (obviously) find what I'm doing wrong in the documentation.

 

Thank you very much.

Link to comment
Share on other sites

Yes, I did, otherwise I think errors would be thrown.

 

LoaderMax.activate( [ XMLLoader, VideoLoader ] );
_vidQueue =  new LoaderMax( { name:"vidQueue", onComplete:handleLoaderEvents } );
_vidQueue.append( new XMLLoader("xml/videos.xml", { name:"videosXML", onChildComplete:handleLoaderEvents } ));
_vidQueue.load();

 

When I add the onChildComplete to the new XMLLoader, nothing happens. Only a "complete" event fires.

 

private function handleLoaderEvents($event:LoaderEvent):void {
trace("LOADER EVENT", $event.type);
switch ($event.type) {
case LoaderEvent.COMPLETE:
	break;
case LoaderEvent.CHILD_COMPLETE:
	trace("\t one video complete... \r");
	break;
}
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...