Jump to content
Search Community

Declaring Loader Variables

mjperry51 test
Moderator Tag

Recommended Posts

Do I need to declare the loader variables I assign in a LoaderMax XML file in the class that uses the loader variables?

 

I have an XML file that assigns loader names; those loaders are used on the class which calls the XML file. Or does the "creation" of those loaders in the XML file make them available in the parent class?

 

Thanks,

 

Mike

Link to comment
Share on other sites

any chance you can re-word this or show your xml and how you plan on parsing it? I'm having a difficult time understanding.

It was rather poorly phrased :( -- let me try again.

 

I have an existing Flash Web Site in which I want to use LoaderMax.

 

How should I name the loader in an external XMLLoader XML file so that it can be used by the main SWF? Do I use the same name as the loader var in the main swf?

 

Example:

 

I use a loader named ldrh in the main swf to load and reference homeContent.swf. In the XML file do I name the SWFLoader that loads homeContent.swf ldrh, and If I do will the swf content be available to the main swf into which it's loaded??

 

Better Question??

 

Thanks, Carl -- I'm still fairly new to AS, so it get's a little confusing sometimes. . .

Link to comment
Share on other sites

hmmm I don't follow:

 

first you say:

 

I use a loader named ldrh in the main swf to load and reference homeContent.swf.

 

so I'm assuming you have something like

 

var ldrh:SWFLoader = new SWFLoader("homeContent.swf", {name:"home"});

 

so that means the ldrh is the name of a SWFLoader that loads homeContent.swf and then you say:

 

In the XML file do I name the SWFLoader that loads homeContent.swf ldrh

 

I don't understand why you also have an XML file that contains a SWFLoader that does the same thing as in step1.

 

regardless of whether or not your SWFLoader was created directly in ActionScript code OR it was created via SWFLoader data that was loaded by an XMLLoader you can reference any loader by name via LoaderMax.getLoader("name or url of loader");

 

Again it would be best to try and create a simple example. If it doesn't work, post the code you are using here and it will be much easier to diagnos the problem.

 

thx.

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