Reputation: 1
Screenshot What have I done wrong? No matter what I do with the movie clips, it never goes to the next frame. [Flash 8]
onClipEvent (load) {
speed = 10;
grav = o;
}
onClipEvent (enterFrame) {
\_y += grav;
if (Key.isDown(Key.LEFT)) {
\_x -= speed;
}
if (Key.isDown(Key.RIGHT)) {
\_x += speed;
}
if (\_root.object1.hitTest(\_root.object2)) {
gotoAndStop(2);
}
}
I tried to get a movieClip to go left or right with arrow keys, and then when it hitTested object2 it should move to frame 2, but the hittest doesn't work.
Upvotes: 0
Views: 8