Jump to content
Search Community

Dynamically Assign urlOrRequest

lgeis test
Moderator Tag

Recommended Posts

Greetings from Boise,
 
I'd like to create a single Instance of LoaderMax.
 
I'd like to use that Instance to call one of several .swf's to load, dynamically, via a MouseEvent.
 
myLoader.urlOrRequest = "myURL.swf" throws an 1119: "Access of possibly undefined property urlOrRequest through a reference with static type com.greensock.loading.SWFLoader."
 
What am I missing, please?
 
Thanks ahead of time!
 

case this.palmer_Aerial.eastBuildingAerial:
    this.removeChild(this.palmer_Aerial);
    this.removeChild(this.mainTitle);
    changeLoader.urlOrRequest = "eastBuilding.swf"
    changeLoader.load(true);
break;
Link to comment
Share on other sites

G'day mate,

 

Unless I'm mistaken, I think LoaderMax is just for including other loaders and then loading them in that way. Instead of using a loaderMax instance, if all your are doing is loading in SWF's you could just use a SWFLoader and change and load the url that way.

 

Something along the lines of this should work:

//First create an instance of your SWF Loader
			var swf:SWFLoader = new SWFLoader("", { container:yourSWFContainer } );
			
			//Then in your case statements set the url
			swf.url = "pathToYourSWF.swf";
			
			//Then after your case statement load the swf content
			swf.load();
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...