Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var my_sound:Sound = new Sound();
  2.  
  3. my_sound.loadSound("bass-c#.mp3", true);
  4.  
  5.  
  6.  
  7. keylistener = new Object();
  8. keylistener.onKeyDown = function() {
  9.     lostIsSoCool()
  10.  
  11. }
  12.  
  13.  
  14. keylistener.onKeyUp = function(){
  15. lostOwns();
  16. }
  17.  
  18. function lostIsSoCool(){
  19. my_sound.start();
  20. }
  21. function lostOwns(){
  22. my_sound.stop();
  23. }
  24.  
  25. };
  26. Key.addListener(keylistener);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement