Jump to content
Search Community

Change a loaderMax's handlers?

BladePoint test
Moderator Tag

Recommended Posts

Is it possible to change a loaderMax's onProgress, onComplete, and onError handlers after it has been created? I'm asking because my preloader uses a loaderMax to load some external content, and once it is done I would like to pass the loaderMax and it's loaded content into my main Flash.

 

Alternatively, I could create a new loaderMax in my main Flash and pass the preloader's loaderMax content which is already loaded. Would a for loop of this work?

mainLoader.append(preLoader.getChildAt(i));
Link to comment
Share on other sites

You should be able to do that using addEventListener like

 

//be sure LoaderEvent is imported

import com.greensock.events.LoaderEvent;


someLoader.addEventListener( LoaderEvent.PROGRESS, loaderProgress );
someLoader.addEventListener( LoaderEvent.COMPLETE, loaderComplete );
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...