Advertisement
Guest User

Untitled

a guest
Mar 29th, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. function pressedMyPianoKey(){
  2. // Do something like pianoKey.gotoAndStop(2) to show a new graphic
  3. }
  4.  
  5. stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
  6. function keyDown(event:KeyboardEvent):void
  7. {
  8. pressedMyPianoKey();
  9. }
  10.  
  11. pianoKey.addEventListener(MouseEvent.CLICK, click);
  12. function click(e:MouseEvent){
  13. pressedMyPianoKey();
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement