5 Replies Latest reply on Oct 24, 2007 8:43 AM by clbeech

    onEnterFrame problems

    rossmurphy88
      This might be a silly question but i can't get past it. I am trying to load movieclips dynamically and then apply a script to their onEnterFrame handler and onLoad handler. When i play the movie the trace in the onLoad doesn't work and the variable is undefined in the onEnterFrame. Does anyone know what the problem is? Is there a better way to place the script into a dynamically generated movieclip?

      Cheers.

      for (i = 1; i < totalitems+1; i++) {

      var photoMov = attachMovie("photo", "photo" + i, i, {_x:movXstart, _y:movYstart});

      photoMov.onLoad = function():Void {
      var getd = 2;
      trace("erwer");
      }; // function end

      photoMov.onEnterFrame = function():Void {
      trace(getd);
      }; // function end

      } // for loop end