1 Reply Latest reply on Apr 19, 2009 5:34 AM by Ned Murphy

    delete current mc

    hoppe11

      how can you delete the "current" mc?

       

      the following scripts returns:

      960 _level0.mc
      [type Function]
      960 _level0.mc
      undefined

       

      function onframe()
      {
          var mc = _root.createEmptyMovieClip('mc', _root.getNextHighestDepth());
         
          var i = 0;
          mc.onEnterFrame = function()
          {

       

              if(i == 960)
              {
                  onframe7();
                 
                  trace(i+' '+this);
                  trace(this.onEnterFrame);
                  delete this.onEnterFrame;
                  delete this;
                  trace(i+' '+this);
                  trace(this.onEnterFrame);
              }
             
              i++;
          }
      }