The main idea is to add a label to the paused frame, mark the current action type action, the current frame position start, the end frame position of the current action end
When you continue playing, start playback from start, and when you reach end, delete the label and continue playing the current action type action.
1 Public varCuractionvo:actionvo;2 3 Public functionPauseaction ():void4 {5 content.stop ();6 }7 Public functionContinueaction ():void8 {9 varMotion_from:int = content.children[0].currentframe;Ten varMotion_to:int = content.children[0].labels[curactionvo.filename].to; One varNewlabel:label3d = Content.addlabel (NewLabel3d ("Temp", Motion_from, motion_to)); AContent.children[0].addeventlistener (pivot3d.animation_complete_event, playnextmotion); - functionPlaynextmotion (event:event):void - { the Content.removelabel (Newlabel); - Content.gotoandplay (curactionvo.filename); - } -Content.gotoandplay ("Temp", 0,2); +}
Pause and resume playback of Flare3d model actions