I'm getting an error when I click a button which brings me to frame 2. The error is:
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]
The Code for Frame 1 is (If I can count correctly that is only 18 lines... not 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 stora开发者_JAVA百科ge1: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();
}
CAN SOMEONE PLEASE EXPLAIN HOW TO FIX THIS ERROR? Thank you!
is this all the code you have? the first frame has everything listed above and there is a second frame(which should exist) which has no code in it?
EDIT: The code above works perfectly fine, you're error is coming from somewhere else.
On the side, you shouldn't create a new thread for the same error:
Tracing flash to a line which doesn't exist, flash CS5/AS3
Error #1034 while running flash application
just put the entire question in one thread, or people will be discouraged from answering.
精彩评论