代码如下::
attachMovie("ball", "ball1", 1);
fire = new Object();
function pressspace() {
if (Key.isDown(Key.SPACE)) {
ball1._x = tank._x;
ball1._y = tank._y;
}
}
function releasespace() {
if (Key.getCode() == 32) {
ball1._x += 10;
ball1._y += 10;
}
}
Key.addListener(fire);
fire.onKeyDown = pressspace;
fire.onKeyUp = releasespace;
为什么炮弹发射不了呢?请指教啊!
Flash 动画: