AS2 When symbol is in a certain position - go to certain frame
Hi, I'm using Flash Professional CS5.5 and I made symbol (movie clip in frame 1) that I can move by keyboard via following script:
onClipEvent (enterFrame) {
if(Key.isDown(Key.RIGHT)) {
_x += 10;
}
if(Key.isDown(Key.LEFT)) {
_x -= 10;
}
if(Key.isDown(Key.DOWN)) {
_y += 10;
}
if(Key.isDown(Key.UP)) {
_y -= 10;
}
}
Now, I want to make that aplication (timeline) goes to certain frame (gotoAndPlay(2)) when symbol is in a certain position (_x or _y coordinate). How can I make this? What do I need to type in actions field of frame 1? Or in actions filed of movie clip?
Thank you