-
Flash Maze Game
Hello,
I am creating a Simple Flash Maze Game,
and i have 2 'Movie Clips' that i want to react when the collide.
IE. When 'CHAR_LVL1' (A Movie Clip, controlled with the Arrow Keys) comes into contact with 'WALL_LVL1'. I want it to 'gotoAndStop(27);'
I am using the code:
Code:
onClipEvent(enterFrame) {
if (_root.CHAR_LVL1, hitTest(_root.WALL_LVL1)) {
gotoAndPlay(27);
}
}
What am i doing wrong.
FYI:
I am using Flash CS5 and Action Script 2.0
-
Why are you using gotoAndPlay?
Shouldn't you be using gotoAndStop?
-
Sorry
Yes i am using gotoAndStop(27);
typo!
-
Actionscript Code:
if(_root.CHAR_LVL1.hitTest(_root.WALL_LVL1)){ gotoAndPlay(27); }
make sure the wall has the instance name WALL_LVL1 and the char has the instance name CHAR_LVL1
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|