SunQuest
           Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 9th, 2003, 06:04 AM
INE-Kpro... INE-Kpro... is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Australia
Posts: 113 INE-Kpro... User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 38 m 7 sec
Reputation Power: 5
disable a sound

is thsi possible?

I have movieA which contains a sound, the movieA loops itself, so the sound emits everytime it loops.

I have a mute button.

they are both on the same timeline.
How do I get the button to mute only the audio part of the movieA.

I tried the action "stop all sounds" on the button. But it only mutes it on one loop only, then it emits again.

Do I have to make the sound into a movie instance, place it in the movieA, and disable that "sound movie" that contains the sound, so atleast the movie still loops but not the sound movie.

There must be an easier way than that.

I also have somewhere in this forum, a question about disabling and enabling buttons. Can someone answer that for me please : )

TIA
__________________
INE-Kpro...
(eye-yen-kay pro)
http://www.INE-Kpro.com
enquiries@INE-Kpro.com
<--- watch this space --->

Reply With Quote
  #2  
Old September 9th, 2003, 03:16 PM
bret bret is offline
flash junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: CO, USA
Posts: 172 bret User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 38 sec
Reputation Power: 6
Send a message via Yahoo to bret
hello, i'm assuming you dragged the sound out of your library and placed it on the timeline? sounds brought in like this are a lot harder to control then sounds instantiated with code. What you could do is keyframe out your sound movieClip. Have the first frame be blank, then a keyframe, then a frame with your sound on it. Then, when you need to pause the sound, just tell that movieclip to gotoAndStop the blank frame, when you need it to start it again, go to the frame with the sound.

like i said, it's easier to do with code tho:

Code:
mySound = new Sound(this);
mySound.attachSound("soundFX");
mySound.start(0,99);

This will loop a sound 99 times with a 0 second offset. And to stop it, just reference the sound:

Code:
mySound.stop();


The "soundFX" is what's called a linkage name. Simply right click on your sound in the library, click "linkage" and type in the name. This is the name that you will use to "attach" it. So, theoretically, my sound has a linkage name (or id) of "soundFX". hope that helps.

-bret

Reply With Quote
  #3  
Old September 9th, 2003, 04:16 PM
INE-Kpro... INE-Kpro... is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Australia
Posts: 113 INE-Kpro... User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 38 m 7 sec
Reputation Power: 5
I like the idea of that code. But I need to have the sound emit with the loop, because it syncs with the loop.
having it emit up to 99 times would mean it would emit sound anytime, which would not look co-ordinated with the movie loop.

and yes I did drag the sound from the library.

Now with that emit sound code, could I have it set to emit sound once, let it emit everytime that frame is hit during the loop. And have a button disable that frame or sound. Or can disable only occur on movies and buttons, but not frames, or sound.

That sound disable thing, will that disable sound permanently unless activated. or will it activate again, once the frame that contains the sound is hit in a loop.

eg.
movieA contains:
frame 2 = sound1
frame 3 = goto frame 1

Now I have the button disable the sound
Will that sound stop, regardless of whether it is looped over.

Now I use a button to enable it again, and will that work.
When a movie reloads again, are all settings reseted, or will it remember that the sound was disabled from before?


TIA

Reply With Quote
  #4  
Old September 9th, 2003, 04:30 PM
bret bret is offline
flash junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: CO, USA
Posts: 172 bret User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 38 sec
Reputation Power: 6
Send a message via Yahoo to bret
yes, you can control this sound however you want, with frame actions, or event actions (on release of a button or whatever)

any time you said

mySound.stop();

it would stop. and any time you said

mySound.start(0,1);

it would play through once.

If you tell it to stop in the middle of playing, it will do so...otherwise, the sound will act independent of whatever frame you intialised it on...

-bret

Reply With Quote
  #5  
Old September 9th, 2003, 07:22 PM
INE-Kpro... INE-Kpro... is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Australia
Posts: 113 INE-Kpro... User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 38 m 7 sec
Reputation Power: 5
so what would happen if you have like 2 sounds that you want controlled, how do u differentiate the 2.

would it be

mySound = new Sound(this);
mySound.attachSound("soundFX");
mySound.start(0,99);


thats for sound 1
and for sound2, it would be

mySound2 = new Sound(this);
mySound2.attachSound("soundFX");
mySound2.start(0,99);

or

mySoundB = new Sound(this);
mySoundB.attachSound("soundFX");
mySoundB.start(0,99);


is that how it works, and so on, and then you just command the mysound part to whichever sound your refering to that you would like stopped?



TIA

Reply With Quote
  #6  
Old September 10th, 2003, 10:44 AM
RedDog's Avatar
RedDog RedDog is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Toronto
Posts: 167 RedDog User rank is Sergeant (500 - 2000 Reputation Level)RedDog User rank is Sergeant (500 - 2000 Reputation Level)RedDog User rank is Sergeant (500 - 2000 Reputation Level)RedDog User rank is Sergeant (500 - 2000 Reputation Level)RedDog User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 31 m 20 sec
Reputation Power: 13
That's looks to be correct. As long as they have different variables the program will be able to control one at a time.
__________________

- Infinityws.com - Providing Reliable Web Hosting Solutions Since 2000
- Web Hosting - Reseller Accounts - E-Commerce Packages
- Free ClientExec License With ALL Reseller Accounts

A Satisfied Customer

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > disable a sound


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway