I have such a problem:
我有一些电影剪辑,有两个不同的孩子:“毁灭”和“背后”。 除了一件事外,他们有同样的结构:“破坏”有传统的tw,“背后”有“沙皮”。 I m在Adobe Air 2.6为Anders管理。 每个孩子都有两个标签:“how”、“ide”。 所有停留范围都有。 我有这样一部法律来控制它们:
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();
}
}
but!!! "instruction" - plays well, "back_anim" - enters to endless cycle on stop frame. When I do : (line_mc[ back_mask_anim ] as MovieClip).gotoAndPlay(7); next frame after stop frame - all ok. Whats the matter? Anyone face with such problem? Thanx.