all groups > flash actionscript > march 2005 >
You're in the

flash actionscript

group:

playing specific frames of a movie clip?


playing specific frames of a movie clip? obikan
3/27/2005 7:45:14 PM
flash actionscript:
hi
I have a movieclip in my library and 4 buttons on my stage.
I want my buttons to play specific parts of the movieclip.
for example button1 will play from the frame 1 to frame 8
and button2 will play from 1 to 15.
How can I write the correct script for this action.
Re: playing specific frames of a movie clip? kglad
3/27/2005 8:15:58 PM
btn1.onPress=function(){
_root.attachMovie("linkID","mc1",1):
// mc1._x=?
// mc1._y=?
checkI=setInterval(checkF,40,8);
}
btn2.onPress=function(){
_root.attachMovie("linkID","mc1",1);
// mc1._x=?
// mc1._y=?
checkI=setInterval(checkF,40,15);
}
function checkF(f){
if(mc1._currentframe==f){
clearInterval(checkI);
mc1.stop(); // do you want to remove this movieclip after its reached that
frame?
}
}
AddThis Social Bookmark Button