0
默认情况下,我在主时间轴的第一帧上有2个动画片段。还有前两个动画片段的actionscript代码。它们保存在每个单独的图层上。他们工作得很好,但是当我在maintime行中将所有三个关键帧从第一帧转移到第二帧时。它不能正常工作。我将它们转移到下一个关键帧的原因是因为我不想在第一帧插入预加载器。下面是我得到的输出消息:当动画片段移动到下一个关键帧as3时,动画无法正常工作
at Flashphotographygallerywebsite10_fla::MainTimeline/frame2()
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at Flashphotographygallerywebsite10_fla::envolop_3()
这里的ActionScript代码:
/*Re-sizeable background*/
//set stage for FBF
stage.align = "TL";
stage.scaleMode = "noScale";
//define dynamic aspect ratios
var bg_mainHeight = bg_main.height/bg_main.width;
var bg_mainWidth = bg_main.width/bg_main.height;
//add event listener to the stage
stage.addEventListener(Event.RESIZE, sizeListener);
//conditional statement to account for various initial browswer sizes and proportions
function scaleProportional():void {
if ((stage.stageHeight/stage.stageWidth) < bg_mainHeight) {
bg_main.width = stage.stageWidth;
bg_main.height = bg_mainHeight * bg_main.width;
} else {
bg_main.height = stage.stageHeight;
bg_main.width = bg_mainWidth * bg_main.height;
};
}
//center bg_mainture on stage
function centerbg_main():void {
bg_main.x = stage.stageWidth/1000;
bg_main.y = stage.stageHeight/1000;
}
// make listener change bg_mainture size and center bg_mainture on browser resize
function sizeListener(e:Event):void {
scaleProportional();
centerbg_main();
}
//run initial locations and size
scaleProportional();
centerbg_main();
/*envelope align to center*/
function resizeHandler(e:Event):void
{
envelope_mc.x = (envelope_mc.stage.stageWidth/2) - (envelope_mc.width/1.15);
envelope_mc.y = (envelope_mc.stage.stageHeight/2) - (envelope_mc.height/1.15);
}
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, resizeHandler);
stage.dispatchEvent(new Event(Event.RESIZE));
stop();
什么是ERROR码? – Benny 2012-02-03 12:57:50
此框架上是否存在envelope_mc和bg_main? – 2012-02-03 13:20:24
输出之后调试模式SET ON:式2:59] \t在flash.display使用::雪碧/ constructChildren() \t在flash.display使用::精灵() \t在flash.display使用::的MovieClip() \t在flash.display一::雪碧/ constructChildren() \t在flash.display使用::雪碧() \t在flash.display使用::影片剪辑() \t在Flashphotographygallerywebsite10_fla :: envolop_3() 有我没有得到错误信息。 – 2012-02-03 14:37:50