3 Replies Latest reply on Jul 2, 2009 11:31 AM by kglad

    AS2 adjustment

    zm15 Level 1

      I am using this code within a AS2 project:

       

      for(var i:uint = 1; i<=3; i++){ 
           this["btn"+String(i)].addEventListener(MouseEvent.ROLL_OVER, bringToFront);
      }

       

      function bringToFront(evt:MouseEvent):void {
           this.setChildIndex(SimpleButton(evt.currentTarget), this.numChildren-1);
      }

       

       

       

      This was originally from a AS3 project. I have tried to change the syntax but i can't seem to figure out what to change it to.

      I am getting compiler errors that say:

      The class or interface 'uint' could not be loaded

      The class or interface 'MouseEvent' could not be loaded.

       

       

      How can i fix this?