当我达到第三帧时,出现运行时错误。但是,运行时错误表示它在frame2:6上。 对于框架3的代码是:运行时错误周期FLASH CS5
stop();
buy_cups.addEventListener(MouseEvent.CLICK, buycups);
function buycups(event:MouseEvent):void{
cash1 = cash1 - 0.25;
cups=cups+5;
}
buy_ice.addEventListener(MouseEvent.CLICK, buyice);
function buyice(event:MouseEvent):void{
cash1 = cash1 - 0.25;
ice=ice+1;
}
buy_lemons.addEventListener(MouseEvent.CLICK, buylemons);
function buylemons(event:MouseEvent):void{
cash1 = cash1 - 1.25;
lemons1=lemons1 + 2;
}
buy_straws.addEventListener(MouseEvent.CLICK, buystraws);
function buystraws(event:MouseEvent):void{
cash1 = cash1 - 0.25;
straws=straws+100;
}
为帧2中的代码是:
stop();
//stand.addEventListener(MouseEvent.CLICK, check);
addEventListener(Event.ENTER_FRAME, check);
function check(ev : Event) : void {
cash.text.text = cash1;
storage_count.text.text = storage1;
lemons_count.text.text = lemons1;
cups_count.text.text = cups;
straws_count.text.text = straws;
ice_count.text.text = ice;
}
shop.addEventListener(MouseEvent.MOUSE_OVER, over_shop);
function over_shop(event:MouseEvent):void{
shop.gotoAndStop(2);
}
shop.addEventListener(MouseEvent.CLICK, shop_now);
function shop_now(event:MouseEvent):void{
gotoAndStop(3);
}
我收到的错误是: 警告:未文库链接为运行时共享库(RSL):AIR Android [SWF] Lemonade-boy.swf - 解压缩后的942698字节 TypeError :错误#1009:无法访问空对象引用的属性或方法。 在Lemonade_fla :: MainTimeline /支票()[Lemonade_fla.MainTimeline ::帧2:6]
如果任何人有什么可以为任何的想法,或者是,造成这种请让我知道。谢谢!
我记得这个游戏。 – Sam 2011-03-25 04:56:37