I have a movie set up with states (as in United States) as clickable mc’s. They are currently set so that when clicked on, a new movie is loaded into a container mc and the state is then deactivated, or can no longer be clicked.
I would like to change this so that rather than loading outside swf’s it would load mc’s so I can keep everything within the same movie. How would I alter the current code to allow for this?
Current code:
[COLOR=Navy][SIZE=1]//mcs labelled mystate0,mystate1 etc
//swfs to load called movie0.swf,movie1.swf etc
createEmptyMovieClip(“container”, 5);
for (var i = 0; i<52; i++) {
this[“myState”+i].ivar = i;
this[“myState”+i].onPress = function() {
loadMovie(“movie”+this.ivar+".swf", “container”);
this.enabled = false;
};
}[/SIZE][/COLOR]
I know how to use attachMovie to load a mc, rather than the loadMovie to load an swf, but not sure how to work in the variables. I was planning on calling the mc’s mystate0question, mystate1question, etc.