PDA

View Full Version : stopping a movie on a selected frame



Yeldarb
September 18th, 2003, 08:48 PM
i can't figure out how to do this...
ok, here's what i need. i have a movieclip that plays, (its bars on a motion guide) and i want it, depending on a variable to play to a certain frame. so, lets say the variable = 1 then i would want it to play until it got to frame 15 then stop, if the variable = 2 then i would want it to play until it got to 30. i hope you understand what im saying...
thanks

claudio
September 18th, 2003, 10:50 PM
myVar = 15;//variable to control which frame to stop
this.createEmptyMovieClip("temp_mc", 1000);
temp_mc.onEnterFrame = function() {
if (clip._currentframe == myVar) {
clip.stop();
delete this.onEnterFrame;
}
};

Yeldarb
September 18th, 2003, 10:57 PM
thanks claudio

claudio
September 18th, 2003, 11:08 PM
welcome :)