Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible ? controling the sound of individual swfs 1

Status
Not open for further replies.

ivelton

Programmer
Mar 12, 2002
7
AU
I have a movie controller that loads several swfs and play them , controled by next/previous buttons

I want to have a "mute" button that stops the sound of any movie that is playing

The problem is : the swf files are from another company, I don't have the fla files and I can't figure out how to use the Sound object to make them stop

Got any idea ?

Thanks very much
 
put each one on a separate level and unload that level if you no longer need it. If you once again need it later...simply load it a again. Regards,
TulsaJeff

cd_tektips.gif
 
Thanks for the help, but the point is , the movies should continue playing, just the sounds that has to be turned on/of

I am trying to make a movie loader, that plays a list of movies, controled by a previous/next button.
And I need a mute button to stop the sound of the current one playing

And to make harder , I don't have the .fla files, they come from another company
 
without knowing the structure of those loaded movies ... it would be difficult to do any type of addressing on the level 5 or whatever level you are dealing with at the moment as in the code below:

_level5.musicclip.gotoAndStop(2); Regards,
TulsaJeff

cd_tektips.gif
 
thanks, tulsa

I will investigate further, but looks very hard without having the fla files.

Thank you very much, if you discover please post it , ok ?

Bye
 
Am I right in assuming there's only one sound clip playing at any given time?
Do you have a link to this setup as it is, to better visualize the problem?

Regards,
new.gif
 
I understand what you are saying and I feel the only way you could achieve this would be to unload the specific music.swf(which would mute it) you no longer want to hear and since they are all on separate levels... only that music clip would stop. The rest would continue.

Now... if your loaded .swf movies have more than sound which is almost what it sounds like you are saying then this may not be an option. Regards,
TulsaJeff

cd_tektips.gif
 
thanks, tulsa
newbie , it is a simple demo In my machine , that why I can't give a link

But is a movie loader, with two buttons : previous/next
when the user clicks, a movie is loaded and starts to play (images and sounds).

When the user click next, a new movie is loaded on the same layer, and starts to play ...

the problem is to "mute" only the current sound, but continue playing the movie. But I don't have control over the swf files, they come from a company, that's what make hard

I am trying to find something like a command/function/etc, that could stop the sound of the current movie, or the general sound of the player

got a better picture now ?



 
What wrong with stopAllSounds then, if I'm not mistaken, loading another sound clip afterwards, would re-activate sound, so you would hear the next one!
Am I missing something else?

Regards,
new.gif
 
thanks oldnewbie, I will check it out the stopAllSounds, I believe will work

Actually I am a java programmer, this is my first flash movie and 2nd day using flash, so I still have lots to learn.

Can you give an example how to use stopAllSounds ? I just need to call the function by itself ?

thanks again, I appreciate your attention
 
Well just stopAllSounds(); before you load the next movie, as:
on (press){
stopAllsounds();
loadMovie("whatever.swf", 5);
}
Consider this example:

Granted sounds are in clips in the main movie in this case, and not on levels, but I'm almost sure it would be the same with movies loaded on levels.

The first 2 buttons each load a different sound and the green button cycles through 3 sounds, but they all use the stopAllSounds(); action before loading the new clip!

Regards,
new.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top