Bunzing
06-04-2002, 06:13 AM
i have this so far:
onClipEvent (load) {
speed = 5;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT)) {
_x -= speed;
_rotation = 270;
}
if (Key.isDown(Key.RIGHT) && !Key.isDown(Key.LEFT)) {
_x += speed;
_rotation = 90;
}
if (Key.isDown(Key.UP) && !Key.isDown(Key.DOWN)) {
_y -= speed;
_rotation = 0;
}
if (Key.isDown(Key.DOWN) && !Key.isDown(Key.UP)) {
_y += speed;
_rotation = 180;
}
}
and this worx all hunky-dory. i have an instance called 'beetle' on stage with the above code on it. then i have an instance called 'wall' on stage. when the beetle hits the wall, i want the movie to go to the next scene. now i know has something to do with hittest, but i can't figure that one out...i am very stupid, so please explain in words even i can understand. thanx!
onClipEvent (load) {
speed = 5;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT)) {
_x -= speed;
_rotation = 270;
}
if (Key.isDown(Key.RIGHT) && !Key.isDown(Key.LEFT)) {
_x += speed;
_rotation = 90;
}
if (Key.isDown(Key.UP) && !Key.isDown(Key.DOWN)) {
_y -= speed;
_rotation = 0;
}
if (Key.isDown(Key.DOWN) && !Key.isDown(Key.UP)) {
_y += speed;
_rotation = 180;
}
}
and this worx all hunky-dory. i have an instance called 'beetle' on stage with the above code on it. then i have an instance called 'wall' on stage. when the beetle hits the wall, i want the movie to go to the next scene. now i know has something to do with hittest, but i can't figure that one out...i am very stupid, so please explain in words even i can understand. thanx!