3 Replies Latest reply on Jul 22, 2013 2:09 PM by mr.monsen

    Animation just works at the first time

    mr.monsen

      he:)

      i thought i finished my animation. But after a test in the browser i recognized that my animation doesn´t work very good. there is one symbol in my animation, it shows up when you click on an image and if you click on a button it  starts to play and loops. if you click again it closes.

      my problem is that it just works when you start the symbol for the first time. if you close it and open it again it´s just start somewhere in the middle of the animation without hitting the button.  some had the same issue or can help me?

      mr. monsen

        • 1. Re: Animation just works at the first time
          AMULI Level 4

          It's rather difficult to help you with this sole description

           

          May be you can post an archive of your project (or a simplified version of it), so we can look at your structure and code ?

           

          Gil

          • 2. Re: Animation just works at the first time
            tahneeg Level 1

            Hm sounds to me like you have the animation playing on loop and when you click a button, it automatically summons that animation by showing it.

            All the while, it's still playing on loop.

             

            What you probably need to do is tell it to play from that symbol's first frame (0).

             

            I'm not sure how you've got your composition set up, but something like this:

             

                sym.getComposition().getStage().getSymbol("ANIMATIONSYMBOL").play(0);

             

            ...could prolly be simplified if you're coding it directly onto the button.

             

            So basically, along with the code that turns the button's visibility on, you'll want it to play from 0.

             

            Hope this helps!

            • 3. Re: Animation just works at the first time
              mr.monsen Level 1

              he tahneeg,

              you´re right. i just told the symbol to close and stop. now it works. thanks for your held and greetings from germany:)