6 Replies Latest reply: Jul 9, 2009 8:28 AM by zm15 RSS

    Noob transition to AS3 question

    zm15 Community Member

      Slowly learning my way into AS3, here is the original code that i am trying to move into AS3 from AS2. The function is to allow the mouse over state to stay selected until the mouse moves off of the selected area. Here is the AS2 code:

       

      mc.onRollOver = function(){
      mc.gotoAndStop(2);
      }
      mc.onRollOut = function(){
      mc.gotoAndStop(1);
      }

       

       

       

      How i have changed it: This is where i need help

       

      mc.addEventListener(MouseEvent.ROLL_OVER)=function(){

      mc.gotoAndStop(2); }


      mc.addEventListener(MouseEvent.ROLL_OVER)=function(){

      mc.gotoAndStop(1); }

       

       

      What am i missing with the code?