3 Replies Latest reply on Dec 14, 2009 9:06 AM by Ned Murphy

    delete onEnterFrame does not work

    gat724

      hi there,

       

      trying to stop the onEnterFrame loop but it won't stop.

      this.onEnterFrame = function() {
      earth.onRelease = function() {
        if (isMain) {
         if (p>0) {
          delete onEnterFrame;
          gotoAndPlay(openWin);
         } else {
          _dispose();
        }

      }else{

        ....

        }
      };
      };

      I'm trying to exit the loop and go to frame openWin but that doesnt jumps so I tried to delete the onEnterFrame  but the loops contiues.

       

      1) how can I exit the loop to frame openWin? thats most importent it's what I need!

      2)if I dont use this.onEnterFrame = function(){ just earth.onRelease = function doent work either unless its in the onEnterFrame why?

      the earth has animation on it but here i'm using it just as a button so I see no conection to why it isnt working unless its in the onEnterFrame??!?

      cheers