|  | Sound ON/OFF button |  | |
| | | AfterFive |  |
| Posted: Wed May 21, 2008 1:05 pm Post subject: Sound ON/OFF button |  |
Hi,
Am having difficulties makeing the sound on/off button work. This is the case... I have created a special layer for the background music and named it MUSIC. I also use a pre-made buttons for on and off positions. While music plays, the off button is shoved on the page. What should i do next?
Thax infront.
Regards, Andrej |
| |
| | | clbeech |  |
| Posted: Wed May 21, 2008 1:40 pm Post subject: Re: Sound ON/OFF button |  |
| you may want to use the Sound class to handle your music in this case, LINK is some information on that. |
| |
| | | nikolap990 |  |
| Posted: Wed May 21, 2008 8:28 pm Post subject: Re: Sound ON/OFF button |  |
paste this on frame where is you button
globalvolume = new Sound();
add this to u button
on (release) { if (globalvolume.getVolume() == 100) { globalvolume.setVolume(0) } else globalvolume.setVolume(100) } |
| |
| | | AfterFive |  |
| Posted: Thu May 22, 2008 6:14 am Post subject: Re: Sound ON/OFF button |  |
Hi there nikolap990, Thanx to your sugestion i managed to solve the problem. While music plays, after i click the OFF button the music stops. I still have to enable the OFF button to turn into the ON button. The buttons are placed in the library. Only the OFF button is placed on the stage. So, any sugestions? Thanx infront for the help.
Regards, Andrej |
| |
|
|