First, I want to apologize for posting this. I tried searching on a number of different terms, but I am so new to AS3, that I really don’t know what kind of terminology to user for this search. Simple problem. I have two movieclips on the stage, one named movieClip1, the other movieClip2. I then have a simple script that randomly picks one of the movieClips, and advances the selected movieclip to frame 2.
var _whichMovie =Math.ceil(Math.random()*2);
trace(_whichMovie);
var _movieName:String;
_movieName = “movieClip”+_whichMovie;
trace(_movieName);
MovieClip(_movieName).gotoAndStop(2);
I may be doing this totally wrong, since I haven’t really touched AS3 very much. I just want to reference an object already existing on the stage. I do not want to have to add the mc to the stage through AS3, since I will be giving this to people who have no idea how to script for maintentance. I think that my problem may have more to do with how AS3 handles movieclips on the stage than anything else. Thanks for any help.