Skip to main content
Participant
November 8, 2013
Question

Time line change with Movie Clip!

  • November 8, 2013
  • 1 reply
  • 423 views

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":

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
November 8, 2013

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);

     }

}