4 Replies Latest reply on Jul 23, 2013 11:22 AM by resdesign

    Help with useing symbols as scenes

    Jynglez888 Level 1

      So im making a little "Escape the Room" game for a class project. I have set up the project into 3 symbols to act as my scenes. a "MenuScene" Symbol. a "FrontScene" Symbol (for the front view of the room the player must escape. and a "BackScene" Symbol for the back of the room. Each symbol has various elements inside of them that include transparent buttons that when found and clicked produce a message with a yes and no buttons for the users choice.
      Now Showing and hiding elements within a symbol (like showing and hideing the yes or no buttons) has not been a problem for me. But trying to show the 3 main symbols is a huge problem as i cannot figure it out.
      For example. the game will start on the "MenuScene" when a player clicks on the "Start" button. it will then play from a transition on the timeline that fades the menu screen to black. at the end of the timeline is a trigger, which is supposed to hide the "Menuscene" (which i believe it does) and then show the "FrontScene" and play from a transition that playes a fade in from black (by using a grouped transparency over a black background.) in the  "FrontScene" timeline.


      Im guessing the problem comes from the code being in the menusymbol and its not communicating outside to the other symbols for the show command. Im no coder so alittle help on this matter would be nice please? this is what i have for the trigger at the end of the transition in the menu timeline to go to the frontscene symbol..


      \\Hide the menu symbol



      \\Show the Frontscene symbol



      \\Play from start label in the frontscene timeline.


        • 1. Re: Help with useing symbols as scenes
          robboerman Level 4

          can you maby show an example of your game so we got more information and know really what the problem is

          • 2. Re: Help with useing symbols as scenes
            resdesign Adobe Community Professional & MVP

            Hi there and welcome to Animate.

            Are you scenes symbols playing on the main timeline?


            If they are symbols, you can use code bellow (have the symbols autoplay turned off):

            var MenuScene = sym.getSymbol('MenuScene');




            and add a click event on the transparent element in  that symbol for example:




            1 person found this helpful
            • 3. Re: Help with useing symbols as scenes
              Jynglez888 Level 1

              thanks redesign.
              although i resorted to just not useing symbols and instead use a bunch of grouped elements. It was a mess to navigate through, but i managed.
              but i will definately keep this in mind for future projects.

              • 4. Re: Help with useing symbols as scenes
                resdesign Adobe Community Professional & MVP

                Yes. I really think that symbols are way easier to control because you can play them entirely when need or play certain labels when needed and use playReverse when needed. If you have all on the same timeline for example, it is harder to control especially on playReverse. Also you can play 2 or more symbols at the same time, but you cannot play 2 or more areas off the main timeline at the same time.



                I plan my composition beforehand.

                1- what do I want to accomplish?

                2- what will each elements do?

                3- do I need to use arrays of symbols?

                4- do I need to use arrays of labels on main timeline or timeline of symbols?

                5- do I need to use navigation and how?



                But glad you got it working.

                1 person found this helpful