我有这样一个问题:
我有一些电影剪辑,上面有两个不同的孩子:"instruction“和"back_anim”。它们有相同的结构,除了一件事:“指令”有经典的补间,"back_anim“有”形状补间“。我在Android版Adobe Air 2.6中运行了它。每个孩子身上都有两个标签:"show","hide“。所有停止帧都存在。我有这样一个代码来控制它们:
protected function fadeOut(event:Event):void {
line_mc.removeEventListener(Event.COMPLETE,fadeOut);
if (line_mc.hasOwnProperty('back_mask_anim')){
line_final_anim_count++;
(line_mc['back_mask_anim'] as MovieClip).addEventListener(Event.ENTER_FRAME, checkFinalAnimComplete);
(line_mc['back_mask_anim'] as MovieClip).gotoAndPlay("show");//show
}
if (line_mc.hasOwnProperty('instruction')){
line_final_anim_count++;
(line_mc['instruction'] as MovieClip).addEventListener(Event.ENTER_FRAME, checkFinalAnimComplete);
(line_mc['instruction'] as MovieClip).gotoAndPlay('hide');
}
if(line_final_anim_count == 0){
setTimeout(lineComplete,time_before_fade_out);
}
}
protected function checkFinalAnimComplete(event:Event):void {
var anim_mc:MovieClip = event.currentTarget as MovieClip;
trace("anim_mc.frame " + anim_mc.currentFrame + " of " +anim_mc.totalFrames +
"name = " + anim_mc.name);
if(anim_mc.currentFrame == anim_mc.totalFrames) {
anim_mc.removeEventListener(Event.ENTER_FRAME, checkFinalAnimComplete);
line_final_anim_count--;
}
trace("line_final_anim_count: " + line_final_anim_count);
if(line_final_anim_count == 0){
lineComplete();
}
}但是!“指令”-播放良好,"back_anim“-在停止帧上进入无限循环。当我这样做的时候:(line_mc‘’back_mask_anim‘as MovieClip).gotoAndPlay(7);停止帧后的下一帧-所有ok。出什么事了?有谁遇到过这样的问题吗?谢谢。
发布于 2011-10-26 21:49:40
我解决了这个问题。对某人来说这会有帮助的。
http://www.kirupa.com/forum/showthread.php?335765-gotoAndPlay%28%29-and-frame-script-stop%28%29
发布于 2013-03-29 02:06:48
我解决了这个奇怪的问题,通过创建一个包含舞台上所有东西的电影剪辑,with和stage函数似乎可以处理电影剪辑,但不能直接处理舞台。
希望我能帮上忙!
https://stackoverflow.com/questions/7902255
复制相似问题