Playing in reverse
hi.
i have 2 questions. i've looked around on google , see cant play video in reverse because of keyframe issues , can use prevframe on movieclips data on frame, second way, i've tried using tweener class, , has "clunky" moments.
so know way plays smooth in reverse either movieclip or video or both?
tnx.
you can play movieclip (eg, mc) frame m frame n using:
startplayf(mc,m,n);
function startplayf(mc:movieclip,m:uint,n:uint):void{
mc.gotoandstop(m);
if(m<n){
dir=1;
} else {
dir = -1;
}
mc.addeventlistener(event.enter_frame,function(e:event){playf(e,dir,n);})
}
function playf(e:event,dir:int;n:uint):void{
if(dir>0){
e.currenttarget.nextframe();
if(e.currenttarget.currentframe==n){
e.currenttarget.removeeventlistener(event.enter_frame,function(e:event){playf(e,dir,n);});
}
} else {
e.currenttarget.prevframe();
if(e.currenttarget.currentframe==n){
e.currenttarget.removeeventlistener(event.enter_frame,function(e:event){playf(e,dir,n);});
}
}
}
More discussions in ActionScript 3
adobe
Comments
Post a Comment