Please don't laugh - Flash MX 2004 attachMovie problem
-
Hi - I know. Don't ask me why! It's all I can afford right now. However, more to the point, I've a problem that is really weird. I'm trying to attach a movie using the following code: //this code is associated with the button:
on(press){
_root.attachMovie("MyOldMovieClip", "MyNewMovieClip"+level, level);
_root["MyNewMovieClip"]+level._x = int(Math.random() * 500);
_root["MyNewMovieClip"]+level._y = int(Math.random() * 450);
level++;
}
I've got a movie clip symbol, and a button symbol in the library. The button only is on the stage. //This code is associated with the stage: level = 0; stop(); Pressing the button produces nothing. However when I run a trace i.e.trace(int(Math.random() * 500));
random values appear. Please put me out of my misery. -
Hi - I know. Don't ask me why! It's all I can afford right now. However, more to the point, I've a problem that is really weird. I'm trying to attach a movie using the following code: //this code is associated with the button:
on(press){
_root.attachMovie("MyOldMovieClip", "MyNewMovieClip"+level, level);
_root["MyNewMovieClip"]+level._x = int(Math.random() * 500);
_root["MyNewMovieClip"]+level._y = int(Math.random() * 450);
level++;
}
I've got a movie clip symbol, and a button symbol in the library. The button only is on the stage. //This code is associated with the stage: level = 0; stop(); Pressing the button produces nothing. However when I run a trace i.e.trace(int(Math.random() * 500));
random values appear. Please put me out of my misery.