4 Replies Latest reply on May 4, 2011 4:50 AM by Macnimation

    Cannot find Scene message on Frame Enter

    Macnimation Level 1

      Hi,

       

      I'm stuck on a problem and I hope you can help.

       

      I have two Scenes created as a test, as there will be many Scenes created eventually for a project.

       

      the Scenes are names Intro and Wrong

       

      In the Intro Scene is a Movieclip (called Yellow1) that contains all of the functionality and timelines for that Scene.

       

      In theYellow1 Movieclip, I have a button that when clicked it goes to a specific frame in the timeline. That works fine.

       

      Along the timeline there is a frame with Actionscript that is set to automatically go to the Scene called Wrong when entered.

       

      The code in the frame is:

       

      addEventListener(Event.ENTER_FRAME, goToWrong);

       

      function goToWrong(event:Event):void
      {
          gotoAndPlay(1, "Wrong");
         
      }

       

      When I test the Scene Intro, everything plays fine until it enters the Frame with the above code.

       

      I get an error of:

       

      at flash.display::MovieClip/gotoAndPlay()
          at FinalProject_Yellow1_fla::yellowOne_1/goToWrong()
      ArgumentError: Error #2108: Scene Wrong was not found.

       

      so it cannot find the Scene called wrong.

       

      I know it has to be something to do with the Scene Wrong being at a different level ?