Reply LinkBack Thread Tools Search this Thread
Old 09-02-2007, 08:01   #1 (permalink)
dorian
i do lines
 
dorian's Avatar
 
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...
__________________
...
  Reply With Quote
Old 09-02-2007, 08:19   #2 (permalink)
digitaloctane
Registered User
 
digitaloctane's Avatar
 
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.
  Reply With Quote
Old 09-02-2007, 08:28   #3 (permalink)
gray
i still want paying
 
gray's Avatar
 
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)
  Reply With Quote
Old 09-02-2007, 08:45   #4 (permalink)
dorian
i do lines
 
dorian's Avatar
 
Join Date: Mar 2003
Location: Poland/Denmark
Posts: 3,227
yes, gray.. it makes sense - thanks!!!
(found a quick and dirty temporary solution to the problem)
__________________
...
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8