当我点击一个将我带到第2帧的按钮时出现错误。错误是:
Warning: No libraries were linked as Runtime Shared Libraries (RSLs) because of your publish settings: AIR Android
[SWF] Lemonade-boy.swf - 862607 bytes after decompression
TypeError: Error #1034: Type Coercion failed: cannot convert 0 to flash.display.DisplayObject.
at fl.motion::AnimatorBase/play()
at fl.motion::AnimatorBase$/processCurrentFrame()
at fl.motion::AnimatorBase/handleEnterFrame()
at flash.display::MovieClip/nextFrame()
at Lemonade_fla::MainTimeline/start_now()[Lemonade_fla.MainTimeline::frame1:23]
第1帧的代码是(如果我可以正确计算只有18行...而不是23 +):
//import flash.events.Event;
stop();
//var bg1_menue:Sound = new Sound();
//bg1_menue.load(new URLRequest("/bg1_menu/bg1_menu.mp3"));
//bg1_menue.play();
var cash1:Number = 5.00;
var maximum_storage:Number = 500;
var lemons1:Number = 10;
//var storage1:Number = lemons1;
var cups:Number = 10;
var straws:Number = 100;
var ice:Number = 5;
var drinks:Number = 0;
startbt.addEventListener(MouseEvent.CLICK, start_now);
function start_now(event:MouseEvent):void{
nextFrame();
}
有人可以解释如何修复这个错误?谢谢!
答案 0 :(得分:1)
这是你拥有的所有代码吗?第一帧有上面列出的所有内容,还有第二帧(应该存在),其中没有代码?
编辑:上面的代码完全正常,你的错误来自其他地方。
另一方面,您不应为同一错误创建新主题:
Tracing flash to a line which doesn't exist, flash CS5/AS3
Error #1034 while running flash application
将整个问题放在一个帖子中,否则会阻止人们回答。