mc1.onEnterFrame = function() {
if (Key.isDown(Key.RIGHT)) {
mc1._x += 10;
}
if (Key.isDown(Key.LEFT)) {
mc1._x -= 10;
}
if (Key.isDown(Key.DOWN)) {
mc1._y += 10;
}
if (Key.isDown(Key.UP)) {
mc1._y -= 10;
}
if (mc1.hitTest(pic1)) {
unloadMovie(pic1);
score.text = score++;
}
if (mc1.hitTest(pic2)) {
unloadMovie(pic2);
score.text = score++;
}
if (mc1.hitTest(pic3)) {
unloadMovie(pic3);
score.text = score++;
}
if (mc1.hitTest(pic4)) {
unloadMovie(pic4);
score.text = score++;
}
if (mc1.hitTest(picno1)) {
unloadMovie(picno1);
score.text = score--;
}
};
Key.addListener(mc1);
ไม่มีความคิดเห็น:
แสดงความคิดเห็น