Hello Stephen,

you can use stopAllSounds() function

Also sound object in flash always depended from movie clip and for
example volume works like _alpha in movie clips:
my_mc._alpha = 50;
//
var my_sound:Sound = new Sound(my_mc);
my_sound.setVolume(50);
both action will set value for all child objects.
it's inherited properties of movieclips

If you need control start and stop of sound and haven't fla files of
external swf you can try to catch calls of sound object using class
like this (AS1 hack):

this.setSoundClass = function() {
 delete this.setSoundClass;
 var IntrinsicSound = Sound;
 var Sound = function (target_mc) {
  trace("new Sound("+arguments+")");
  this.init(target_mc);
 };
 var tmp = Sound.prototype;
 tmp.init = function(target_mc) {
  this.__target_mc = target_mc;
  this.__in_sound = new IntrinsicSound(target_mc);
 };
 tmp.attachSound = function(id) {
  trace("attachSound("+arguments+")");
  this.__in_sound.attachSound(id);
 };
 tmp.start = function(secondOffset, loops) {
  trace("start("+arguments+")");
  this.__in_sound.start(secondOffset, loops);
 };
 // ....... etc
 _global.Sound = Sound;
 ASSetPropFlags(_global, 'Sound', 7, 1);
};
this.setSoundClass();
// =====================
var my_sound = new Sound(this);
my_sound.attachSound("my_song");
my_sound.start();

but you can't catch nothing if sound placed on timiline.

and another one way: you can stop sound in movie clip using empty
sound object:

my_sound = new Sound(any_mc)
my_sound.stop()
- its works for start and event sync
a stream sync sound you can stop by this way: any_mc.stop();

good luck!


SF> I have an interactive demo that consists of one main SWF file that
SF> loads in other SWF files depending on what the user clicks on in
SF> the main SWFs navigation.  
SF> Within this main SWF and within all the seperate SWFs are numerous
SF> movies each with their own timeline doing it's own thing.
 
SF> In numerous place on timelines throughout this set of SWFs, sound
SF> effects have been hardcoded onto their respective timeline (i.e:
SF> not loaded dynamically using the sound object).  
 
SF> So is there any way to turn off sound globally regardless of where
SF> it's located on whatever timeline within whatever SWF. So I can
SF> just create an on/off button for the main SWF that will control  
SF> sound globally ???
 
SF> Thanks._______________________________________________

-- 
Ivan Dembicki
____________________________________________________________________________
[EMAIL PROTECTED] |                                        | 
http://www.design.ru

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to