2 Replies Latest reply on Nov 27, 2007 6:30 AM by Newsgroup_User

    how to detroy an event

    dpaultaylor Level 1
      Hi All

      I have a problem with the following code :-

      _level0.bg_mc.onEnterFrame = function () {
      with(_level0.bg_mc) {
      trace (_alpha) ;
      if (_alpha < 100) {
      _alpha = _alpha + 10 ;
      if (_alpha == 100 ) { onEnterFrame = null; }
      }
      }
      }

      The problem is that the onEnterFrame function is continuing to execute. Am I destroying the onEnterFrame Correctly???