Jump to content
Search Community

Accessing Loader content

cendive test
Moderator Tag

Recommended Posts

I'm sure there's something simple I'm missing, but I can't figure out how to access or pass variables to the loader content. I've got some variables being read by the preloader with swfobject and need to pass those on to the main swf when it loads in. Before loaderMax I just used this:

 

MovieClip(preloader.content).thisVar = thisVar;

 

But I can't figure out the loaderMax equivalent. Maybe there's a better method I should be using anyway. Thanks.

Link to comment
Share on other sites

The loader's "content" refers to the ContentDisplay object (a Sprite) into which it places the raw content (which in the case of a SWFLoader is your swf unless there's a security error - then it's the Loader object). So the short answer is: use rawContent like:

 

loader.rawContent.thisVar = thisVar;

 

If you need to get a specific DisplayObject that's on the root level of your subloaded swf, you can use the loader's getSWFChild(), just so you know. (not that you need it here).

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...