1 Reply Latest reply on Feb 16, 2015 4:39 AM by Ned Murphy

    New to Flash having Button/Scene/Layering Issue Actionscript 3.0

    HarryCorry1968

      Hi,

       

      I am relatively new to flash and AS3, so if replies could be dumbed down a little that would be greatly appreciated!

       

      What I have is a Scene that plays the roles of a menu with (currently) two buttons, these buttons link to the first frame of 2 separate scenes.

       

      This works fine. So in ,say for example, 'Scene 1' It is a simple drag and drop layout, no animation. This is supported by 3 buttons on the page, one button links to a webpage (works)

      then there is a 'reset button' which brings the movieclips back to their original places and finally a 'menu' button that brings us back to the main page. The buttons all do what they are meant to

      but when I go back to the menu, any of the movieclips that had been interacted with are brought to the front of all scenes and are visible on the Menu Scene.

       

      How do I ensure movieclips stay within their scene.

       

       

      And bonus question I need the scene to reset when I hit the menu button as well as when I hit the reset button. So what I want is both buttons to be able to reset the scene.

       

      Thanks!

       

      Darragh

        • 1. Re: New to Flash having Button/Scene/Layering Issue Actionscript 3.0
          Ned Murphy Adobe Community Professional & MVP

          If you are dynamically creating objects or adding them (using addChild) then they lose their grip on the timeline.  You need to anchor/add them to objects that have a solid home in the timeline - as in objects that are manually placed in the timeline.

           

          Before you become overly fond of the use of scenes you should try to avoid using them.  They work fine for animators who work on lengthy animated pieces that flow from one to the next but for anything that involves navigation scenes can be very problematic.  It is better to just use one scene and either spread things out along the timeline and/or use movieclips where you control their visibility.  When you publish a file, all the scenes are scrunched into one timeline anyways so there is no benefit beyond providing a form of content isolation.

          1 person found this helpful