PDA

View Full Version : playing a section of a movie


PeteoFun
01-12-2005, 12:41 AM
THis is probably really easy, and I'll kick myself when I learn how to do it. I want to play 10 frames of a movieclip after i drag andd drop it. i can tell it from which frame i want it to start playing, but how do i tell it at what frame to stop?

Xeef
01-12-2005, 12:54 AM
hi

try this (not tested)

function PlayFromTo(Mc, From, To) {
Mc.gotoAndPlay(From);
_root.onEnterFrame = function() {
if (Mc._currentframe == To) {
Mc.stop();
delete _root.onEnterFrame;
}
};
}
PlayFromTo(_root.My_mc, 1, 5);