Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. stop();
  2.  
  3. var buttons:Array=[button_01,button_02,button_03,button_04];
  4. for (var u:Number =0; u<buttons.length; u++) {
  5. buttons[u].addEventListener(MouseEvent.CLICK,onClick);
  6. buttons[u].addEventListener(MouseEvent.ROLL_OVER,onOver);
  7. buttons[u].addEventListener(MouseEvent.ROLL_OUT,onOut);
  8. /*for (var i:Number = 0; i<btnNum; i++) {
  9. button.name="button"+i;
  10. }*/
  11.  
  12.  
  13. function onClick(evt:MouseEvent):void {
  14. if (this.currentFrame==1) {
  15. this.target.play();
  16. } else {
  17. }
  18. }
  19.  
  20. function onOver(evt:MouseEvent):void {
  21.  
  22. }
  23.  
  24. function onOut(evt:MouseEvent):void {
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement