| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
i do lines
Join Date: Mar 2003
Location: Poland/Denmark
Posts: 3,227
|
FLASH: how to... stopAllSounds???
simple question of the day: how do i stop all sounds on load? I have a sound clip on the main stage, that i just dont want to play when the movie starts playing... :S ps: urgent... ...
|
|
|
|
|
|
#2 (permalink) |
|
Registered User
Join Date: Feb 2007
Location: Rhode Island
Posts: 24
|
Well, ill take a stab at it. If your audio clip is on the main timeline, and you dont want it to start playing at the begining, add a keyframe to when you want the audio to start and add the sound to start on that keyframe. Or dont put the audio on the timeline, make a call to the audio when you need it. |
|
|
|
#3 (permalink) |
|
i still want paying
Join Date: Oct 2003
Location: newcastle, uk
Posts: 4,728
|
stop (Sound.stop method) public stop([linkageID:String]) : Void Stops all sounds currently playing if no parameter is specified, or just the sound specified in the idName parameter. Availability: ActionScript 1.0; Flash Player 5 Parameters linkageID:String [optional] - A parameter specifying a specific sound to stop playing. The idName parameter must be enclosed in quotation marks (" "). Example The following example uses two buttons, stop_btn and play_btn, to control the playback of a sound that loads into a SWF file. Add two buttons to your document and add the following ActionScript to your FLA or AS file: var my_sound:Sound = new Sound(); my_sound.loadSound("song1.mp3", true); stop_btn.onRelease = function() { trace("sound stopped"); my_sound.stop(); }; play_btn.onRelease = function() { trace("sound started"); my_sound.start(); }; See also start (Sound.start method) |
|
![]() |