?
Solved

Background music Mute/Play problem (urgent)

Posted on 2004-03-22
9
Medium Priority
?
1,034 Views
Last Modified: 2012-08-14
I have a music loop clip which is playing continuously in the backgound and voiceover to text which displayed on screen. I am using two different buttons for background music and voiceover. Problem is i want background music to be stopped when click mute button. I tried using "mySound.setVolume(0)" method, it stops both background music and voiceover to text. Please help me. Thank you.
0
Comment
Question by:anjip
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 4

Expert Comment

by:RedLava
ID: 10655504
Hi mksuhale,

How is the background music started. If it is placed in the timeline at design time the best idea is to take it out of here and load it at runtime as a sound object. This sound object can then have it's setVolume value altered.

The question is, is the background sound loaded at runtime or embeded at design time?

RedLava
0
 
LVL 4

Expert Comment

by:RedLava
ID: 10655555
0
 
LVL 9

Expert Comment

by:rexmor
ID: 10656017
anjip,

maybe something like this...

bgrnd_snd = new Sound();
voice_snd = new Sound();

bgrnd_snd.loadSound("bgrnd_snd.mp3,1);
bgrnd_snd.start(1,0);

voice_snd.loadSound("voice_snd.mp3,1);
voice_snd.start(1,0);


bgrnd_snd_btn.onRelease= function(){
   bgrnd_snd.stop();
 //  bgrnd_snd.setVolume(0);
}



0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:anjip
ID: 10656963
Hi RedLava,

Background music loaded at run time.

Background music is in "bgsnd.swf" and vocieover in "voice_snd.swf".
when "voice_snd.swf" is playing "bgsnd.swf" loaded in to "voice_snd.swf" at different _level

anji
0
 
LVL 1

Author Comment

by:anjip
ID: 10657011
hi rexmor,

Button is toggle button. When i stop and want to start it again, it does not start.

anji
0
 
LVL 1

Expert Comment

by:andylaw78
ID: 10657150
hey anjip,

how about putting each sound in different movie clips, then when starting/stopping sounds, calling them from the movie clips?

somthing like
_root.sound1.mySound.setVolume(0);
_root.sound2.mySound.setVolume(0);

Separating them like this should stop them from both stopping

good luck!
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 10657874
you should be using the Sound Object, which I believe you are trying to do...

I think you may be using the same object for both sounds, so when you set mySound to a volume of 0, it sets all sounds objects attached to the mySound object to 0...

I believe rexmor has the right idea by using 2 seperate sound objects...

please post your .FLA to a web site and provide the url....  we can take a crack at the actual file...


rp  
0
 
LVL 9

Accepted Solution

by:
rexmor earned 1500 total points
ID: 10663422
hello everyone,

anjip, why you still need to put your sound into .swf? instead of external mp3 file...

for a toggle

soundStatus = true // default sound is playing

if(!soundStatus ){
mySound.start()// you need to get the duration where it stop.
}else{
mySound.stop();
}

Please post ur .fla as rp suggested.



rexmor

0
 
LVL 8

Expert Comment

by:Cerf
ID: 11245608
Anji, are you still there?

Do you still need our help?

Did someone resolved your problem?

Regards,

Cërf.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question