1 Reply Latest reply on Mar 3, 2014 9:46 PM by Sudeshnasarkar27

    Nested symbols

    taramariemortensen Level 1

      Hi everyone,

       

      I'm currently attempting to learn some basics of Adobe Edge Animate so I can show my students how to create an interactive timeline. Right now, I have a simple setup that looks like this (below). When someone clicks on the "12 pm" button, I have a little hamburger float up.  That's great. The hamburger itself is a nested animation with three keyframes: floatup, inplace, floatdown. 

       

      So here is the question. If someone goes from 12 pm then to 10 am, is there a way to have the hamburger float back down? (as opposed to simply disappearing).  It needs to be some kind of conditional statement, like if someone is already at 12pm, then click on 10 pm (or any other), then play the animation from "floatdown."  Of course, I don't just want that to activate if someone clicks on 10am (or anything other than 12 pm), because it only makes sense for the hamburger to float down if it had already floated up.

       

      Thanks for any help.  I know this is a crude example.  Just playing around.

       

      Tara

       

      Screen Shot 2014-03-03 at 5.15.28 PM.png

        • 1. Re: Nested symbols
          Sudeshnasarkar27 Adobe Employee

          Hi Tara,

           

          You can declare a variable say visited and update this only when the user clicks the 12 p.m button  -

          //on compositionReady of the stage set the "visited" variable to 0.

          sym.setVariable("visited" , 0);

           

          On click of 12pm button set this varible to 1 -> sym.setVariable("visited" , 1); and check if this is already "1" when the user clicks on 10 a.m button and only then call the floatdown handler of the hamburger symbol.

           

          if(visited == 1)

          {

               // Call the animation from floatdown keyframe of the hamburger symbol.

          }

           

          Attaching the sample as well.

           

          Let me know if this helps!

           

          Thanks and Regards,

          Sudeshna Sarkar

          1 person found this helpful