3 Replies Latest reply on Oct 8, 2012 12:17 PM by Daniel Farkas

    beforeDeletion not runs the effect

    Daniel Farkas

      Hi,

       

      I have a symbol (autoplay timeline off ), the main stage I insert an instance of that symbol.

       

      In symbol is a short animation, a fade.

       

      I call on the creationComplete event sym.play (); ok works

       

       

      I call the event beforeDeletion sym.playReverse ();

       

      but the symbol is deleted immediately, the fade does not appear.

       

      The event beforeDelete is called, if I place an alert () it appears, but not fade effect.

       

      any ideas?

       

      tanks

        • 1. Re: beforeDeletion not runs the effect
          Peter Flynn (Adobe) Adobe Employee

          I've moved this from Edge Code to the Edge Animate forum, since I think that's the tool your question pertains to.

           

          - Peter

          • 2. Re: beforeDeletion not runs the effect
            elainecc Adobe Employee

            Hi, Daniel-

             

            You're hitting a race condition right now.  The deletion will not wait for the animation to play.  Instead, you're probably better off not using beforeDeletion and instead setting up a trigger in the symbol to delete itself, then call a label that will play that selection.

             

            Hope that helps,

             

            -Elaine

            • 3. Re: beforeDeletion not runs the effect
              Daniel Farkas Level 1

              Hello Elaine,

               

              I skirted the situation by putting on stage method deletes the object that the call to

               

               

              sym.getSymbol ("SimbolName"). playReverse (500, true);

               

               

              I put a symbol on the timeline trigger position 0

               

               

              sym.getParentSymbol (). getSymbol (sym.getSymbolElement ()). deleteSymbol ();

               

               

              It works perfectly, however I think a workaround.

               

               

              Tanks.

               

              I forgot this,

               

               

              The Symbols must be false as autoplay timeline, in creationComplete (symbol method), i call sym.play (0, false), not to run the deletion trigger in position 0 in play moment.