Copy link to clipboard
Copied
Help, I want a movie clip to interact with another to change the scene.
this is my code on the "Door":
onClipEvent(enterframe) {
if (_root.char.hitTest(this)) {
_root.gotoAndStop("Game2", 1);
}
}
Game2 is my next scene name.
but it is not working!
Why is that!
the other movie clip's instance is "char":
Copy link to clipboard
Copied
Take the code off of the object and place it in the main timeline, modifying it as shown...
this.onEnterFrame = function(){
if (char.hitTest(Door)) { // replace "Door" with the instance name you gave it
delete this.onEnterFrame;
gotoAndStop("Game2", 1);
}
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now