package
{
import flash.display.*;
public class documentclass extends MovieClip
{
public var playscreen:avoiderclass;
public function documentclass()
{
playscreen.addEventListener(playerEvent.DEAD, onplayerdeath);
playscreen.x = 0;
playscreen.y = 0;
playscreen = new avoiderclass();
addChild(playscreen);
}
public function onplayerdeath(PlayerEvent:playerEvent):void
{
var Gameover:gameover = new gameover();
Gameover.x = 0;
Gameover.y = 0;
addChild(Gameover);
playscreen = null;
}
}
}
好的,当舞台(这个类)是将玩家和敌人的电影剪辑拉入其中的类时,它起作用了。然后我为舞台添加了这个并将另一个用于播放屏幕......我不知道为什么它不起作用,但谁能给我任何可能为什么它不起作用,没有错误弹出......