我在frame1:26上发生了错误。下面是该框架的代码(完整代码)。该错误消息我得到的是是:将闪光追踪到不存在的线上,闪光灯CS5/AS3
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/begin()[Lemonade_fla.MainTimeline::frame1:26]
如果我读这条消息正确它说,它不具有它的任何一行代码遇到错误。见(21线不是26 /不管):
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 storage1:Number = lemons1;
var lemons1:Number = 10;
var cups:Number = 10;
var straws:Number = 100;
var ice:Number = 5;
var drinks:Number = 0;
startbt.addEventListener(MouseEvent.CLICK, begin);
function begin(event:MouseEvent):void{
nextFrame();
}
2帧代码:
import flash.events.Event;
stop();
stand.addEventListener(MouseEvent.CLICK, check);
addEventListener(Event.ENTER_FRAME, check);
function check(ev : Event) : void {
cash.text.text = cash1;
lemons_count.text.text = lemons1;
cups_count.text.text = cups;
straws_count.text.text = straws;
ice_count.text.text = ice;
}
如果你需要,我会为它提供其他源代码。
shop_mc.addEventListener(MouseEvent.CLICK, shopnow);
function shopnow(event:MouseEvent):void{
nextFrame();
}
for(var i:Number = 0; i<2; i++)
{
var guide_tut:guide = new guide();
addChild(guide_tut);
}
可能是您的导游类的问题。 发布源如果它不是一个敏感的项目。 – Saad 2011-03-25 19:05:47