5 Replies Latest reply on Jul 26, 2015 4:55 PM by jonesy.

    Disable creationComplete function after execution OR at specific frame

    jonesy.

      Hey,

       

      In my Edge Animate file I have a function set on creationComplete, so that when a scroll is detected it jumps to a certain frame.

      It works fine but I need it to disable this function once it has reached that frame, or once the function has been executed, so that the animation doesn't jump back in time every time a scroll is detected.

       

      This is the function I have:

       

      // insert code to be run when the symbol is created here
      Symbol.bindSymbolAction(compId, symbolName, "creationComplete", function(sym, e) {
      
      
               function MouseWheelHandler(e) {
      
      
      
      
               sym.play(14383);
      
      
               }
               var ele= sym.getSymbolElement()[0];
      
      
               if (ele.addEventListener) {
      
      
      
      
                // IE9, Chrome, Safari, Opera
                ele.addEventListener("mousewheel", MouseWheelHandler, false);
                // Firefox
                ele.addEventListener("DOMMouseScroll", MouseWheelHandler, false);
               }
               // IE 6/7/8
               else ele.attachEvent("onmousewheel", MouseWheelHandler);
      
      

       

      Any help would be greatly appreciated.

       

      Cheers,

      Sam