The Team Jackulator Forums
May 15, 2024, 02:45:24 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
   
   Home   Help playlist Arcade Search Media Downloads Login Register  
The Jackulator 9000 Forums
Pages: [1]   Go Down
  Send this topic  |  Print  
This topic has not yet been rated!
You have not rated this topic. Select a rating:
Author Topic: Stopping Sounds by Pressing Space Bar or A Picture  (Read 1020 times)
0 Members and 1 Guest are viewing this topic.
jackulator
... --- ...
Administrator
jackulator.com
******
Offline Offline

Location: Eastwick, Rhode Island
Posts: 10507


"Twenty pushups a day..."


WWW Awards
« on: November 27, 2008, 02:31:08 am »

most people put the stop sounds functionality on the space bar, but I also put it on the picture

to make the space bar stops sounds do this:

1. create a new layer just for code
2. click in the new layer in frame 1 and paste this code:

soundStopper = new Object();
soundStopper.onKeyDown = function() {
   if (Key.getCode() == Key.SPACE) {
      stopAllSounds();
   }
};
Key.addListener(soundStopper);

to put the stop function on the picture too, do this:

1. click on the picture
2. turn the pic into a button by going to Modify>Convert to Symbol and make sure 'Button' is selected and click 'Ok'
3. make sure just the pic/button is selected by deselecting it and clicking back on it and then paste this code on it:

on (press) {
    stopAllSounds();
}
Logged

Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  



Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC | Sitemap Valid XHTML 1.0! Valid CSS!
Page created in 0.541 seconds with 20 queries.