Share Posted February 15, 2012 Hello I'm using SWFloader and LoaderMax to load 2 swf. One of these SWF needs access to a function from the maintimeline when user clicks. So, within the eventlistener handler function of child swf, I previously used: (root.loaderInfo.loader.root as MovieClip).function(); This worked with AS3 loader class, but now it's null. Can I get this to work with SWFLoader and LoaderMax? If not, is there a way you recommend? Thank you, Nic Link to comment Share on other sites More sharing options...
Share Posted February 15, 2012 inside your child swf try: var parentMovie:MovieClip = this.parent.root as MovieClip; parentMovie.someFunction(); inside your parent movie use function someFunction():void{ trace("it worked!"); } Link to comment Share on other sites More sharing options...
Author Share Posted February 16, 2012 Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now