Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Time line change with Movie Clip!

New Here ,
Nov 07, 2013 Nov 07, 2013

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

TOPICS
ActionScript
412
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 07, 2013 Nov 07, 2013
LATEST

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

     }

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines