-
!! Unloading a Variable!! Help Needed
Hi,
I need some help unloading a variable when you click on a button and I need to know what to add to the button (on press) to unload the variable. heres my script:
myVar = "home.swf";
function loadFunction(movie) {
loaderClip.loadMovie(movie);
trace(movie+" is loaded");
}
// names of clips loaded
myClips = ["section1.swf", "section2.swf", "section3.swf", "section4.swf"];
for (var n = 0; n<4; n++) {
var fakeName = this["but"+n];
fakeName.myNum = n;
fakeName.onPress = function() {
_root.animationClip.play();
myVar = myClips[this.myNum];
};
}
and here is the script that loads the variable:
stop();
_root.loadFunction(_root.myVar);
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|