Good evening Flash men. Uhm, I’m using Flash CS4 and I’m trying setup my fla this way: I want to load different movies with several buttons, and I want to code the buttons in a way that will get the name of the movie to load from a variable. More emphatically, I want to create a variable name lastLoaded to store what was the last movie loaded into the main movie.
Here is what I got thus far:
var my_loader:Loader = new Loader();
addChild(my_loader);
var lastLoaded:String;
myVideos.addEventListener(MouseEvent.MOUSE_DOWN, loadTheBaby);
myCars.addEventListener(MouseEvent.MOUSE_DOWN, loadTheCars);
function loadTheBaby (e:MouseEvent):void{
my_loader.load(new URLRequest(“lastLoaded+.swf”));
lastLoaded=“myVideos”;
}
function loadTheCars(){
my_loader.load(new URLRequest(“lastLoaded+.swf”));
lastLoaded=“myCars”;
}
Here’s the error message i’m getting:
1120: Access of undefined property myVideos.
1120: Access of undefined property myCars.
So,clearly, whenever a button is clicked, I want the the name of that button/movie TO BE stored in the variable lastLoaded and I also need the specific movie to load. I need to code it this way because I’m making my own transition animation and not the unattractive ones that Adobe provided. Any assistance will be immensely appreciated…Thank you…