Advertisement
ealbinu

Untitled

Oct 19th, 2011
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. stop();
  3.  
  4. btn1_mc.addEventListener(MouseEvent.CLICK, clicked);
  5. btn2_mc.addEventListener(MouseEvent.CLICK, clicked);
  6. btn3_mc.addEventListener(MouseEvent.CLICK, clicked);
  7.  
  8. function clicked(e:MouseEvent):void {
  9.     trace(e.target.name);
  10.    
  11.     switch(e.target){
  12.         case btn1_mc:
  13.             gotoAndStop(1);
  14.             break;
  15.         case btn2_mc:
  16.             gotoAndStop(2);
  17.             break;
  18.         case btn3_mc:
  19.             gotoAndStop(3);
  20.             break;
  21.        
  22.         }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement