all groups > flash actionscript > may 2004 >
You're in the

flash actionscript

group:

overriding sound


overriding sound justDABE!
5/27/2004 10:03:32 PM
flash actionscript:
here's the situation.

i have a stage, in which i load an another .swf onto the mainstage. On that
external .swf, i have a streaming audio within that movie. So here's my
question. How would i override the sound settings from the mainstage to the
external .swf, but without stopping the movie in the background?? (the
external .swf consists of actions that coresponds with the audio)....

help. me . please....
Re: overriding sound Jack.
5/27/2004 10:41:14 PM
[quoted text, click to view]

if you load the external.swf to a movieclip on the main timeline,
you can create a sound object linked to the movieclip instance
name,

loader.loadMovie("test.swf");

this.onEnterFrame = function(){
if(loader.getBytesLoaded() > 0){
ss = new Sound(loader);
vol = 100;
delete this.onEnterFrame;
}
};

volumeDown_Btn.onRelease = function(){
vol -= 25;
vol < 0 ? vol = 0 : vol;
trace(vol);
ss.setVolume(vol);
};

if you load to a level, link to the that level -

loadMovieNum("test.swf",99);

this.onEnterFrame = function(){
if(_level99){
ss = new Sound(_level99);
vol = 100;
delete this.onEnterFrame;
}
};

hth


Re: overriding sound justDABE!
5/28/2004 7:35:06 PM
much appreciated


thanks
AddThis Social Bookmark Button