Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




I've Got My Button, With Sound, Now What?



Hi Guys!
 Okay, you guys have coached me through this seamly simple project of a "Button" - I've got my button, with text changing for the rollover, and when clicked it plays the sound clip GREAT! NOW... I need to get the url - I thought that if I created another button (used the Alph Effect to hide it) and put a key frame in right after the sound stops,then I could add an action - get url, but it starts cutting off my sound again, because of the mouse event "on release" So, what would you suggest?
Thanks in advanced - you guys really help alot with out making me feel stupid!



Tek-Tips > Adobe(Macromedia): Flash Forum
Posted on: 7 Mar 02 0:42


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Flash Intro - On Button Sound Play, Off Button Sound Off
Hello,

I am working on this flash project. I want to make it so that when you put your mouse on the button, it plays this song, but when you take your mouse off, it stops the song..sounds really easy, but I need some help. Thanks!

David

Help Making A Sound On Off Button That Turns Sound Off When On And On When Off
i need a button that detects if the sound is on or off and acts accordingly (if statement or something)

please help asap

Mute Sound/Pause Sound Button HELP
I made a button (Flash CS3, AS2 file) and want it to mute a sound called 'GuitarLoop' which I've imported and have on 'Layer 3. My button's on 'Layer 3' and I need it to mute 'GuitarLoop' when pressed.

I searched on google but didn't really find anything, soooo.... Do you know how I could fill in the blanks?

on (release) {
not_set_yet.stop()
}

I'm guessing here but...

on (release) {
GuitarLoop.stop();
}

or


on (release) {
'GuitarLoop'.stop("Scene 3", "Layer 3", 1)
}

is it something like that?


also this is a looped sound.

Play Sound/stop Sound Button
i want to make a single button to play a sound, and if pressed again, stop the sound. and if pressed again, play the sound, and so on...
i know it has to be made with a boolean variable, true/false, but i just can't figure out how.
any help?
thank you very much.

Rotating Menu/ How To Prevent Button Sound When Button Is Under Another Layer
I have a rotating menu on my site. The menu buttons have a sound effect when they are rolled over.. I have a layer overtop of the rotating menu, but the buttons still rollover (and that sets off the sound effect.) when they are hidden by the top layer. How can I prevent this? It there any _x _y actionscripting that I can do to prevent this?

Here is the site if you want to see what I'm talking about:

http://www.webraptor.com/index2.html


Thanks,

-- Jeff

Mute All Sounds Button / Resume Playing Sound Button
Hi there gang!

ok i dont know how exactly to do this..so i need some help, a fla file for this kinda thing would be super if you happen to have the solution.

Ive done about a 5 mins flash presentation with audio speak for that duration, the speak itself is cut up into about 36 seperate wav files on the timeline. ANyhow i would like a MUTE button that when click would mute the sound...BUT!

Important thing is that if the viewer decides to click it again at anytime and wants to hear the speak, it should resume from where you are currently going on the timeline..this is streaming speak which is in sync with animations.

I could use a Stop all sounds commmand but then thats not quite enough..would like to also have the option to resume speak and in sync from where you are currently..

The file is here and is almost done..exe file link:

http://www.beats.midnightsunrecordin..._LtY/LtY20.exe

Im in quite a hurry with this so if anyone has any comment please please..im crap with action script so an FLA for normal MX would be helpful..

many thanks!

cc

Sound On/sound Off Button Script?
Hi-
I am trying to script a button that when clicked would turn the music track off, and when clicked again would turn it back on? I searched through all the help and tutorial postings, but didn't find anything...ideas or help? Thanks

HELP My Sound Button Won't Turn Off The Sound...
I am not sure what i have done wrong i created a sound on off button, it worked while it was in its own movie, when i copied the symbol over and changed the sound it turns on and off it only will start playing the sound again after i click the on button. It never stops the sound. See FLA for details Sound FLA

Need help soon, thanks a bunch. Brian

Button Sound To Cancel Out Other Sound. How?
I'm creating a Flash project with buttons that trigger sounds when clicked. What script do I need in order for the sound from one button to cancel out the sound from one clicked previously so the 2 sounds don't overlap?

Help much appreciated

Sound Button With Multiple Sound
Hello everyone,

I used the below actionscript for one button with one sound so how to write as3 three different buttons with three different sound?

Any help would be greatly appreciated.

Thanks,

var loadSnd:URLRequest = new URLRequest("SORTER.mp3, GUITAR.mp3, STACKER.mps");
var thisSnd:Sound = new Sound();
var sndTrans:SoundChannel = new SoundChannel();

thisSnd.load(loadSnd);

play_btn.addEventListener(MouseEvent.CLICK, playF);
stop_btn.visible = false;
stop_btn.addEventListener(MouseEvent.CLICK, stopF);

function playF(event:MouseEvent):void{
SoundMixer.stopAll();
sndTrans = thisSnd.play();
play_btn.visible = false;
stop_btn.visible = true;
}

function stopF(event:MouseEvent):void{
sndTrans.stop();
stop_btn.visible = false;
play_btn.visible = true;

Mute Button Or Sound Stop Button.
I would like to make a mute button to make the sound stop in a movie.. I'm a newbie and can not find any code or script for this. anyone have and answer or script they would like to share for this button...
Thank You!!
  

Making One Button Play One Sound And Another Play A Different Sound
i'm very much a novice when it comes to flash.
i've created three separate buttons in three separate layers. i've also added three music files in three more layers. how can i get it so one button plays one music file and another button plays a different music file? i've tried putting "goto and play" for each button in actionscript but it doesn't seem to help.

any ideas?

i would be very grateful

Sound Button..."down" While Sound Plays
I've searched and searched but can find no example of what I'm looking for...maybe someone here could point me in the right direction.

I need a button that will play a sound when pressed and will stay engaged (down) while the sound plays (regardless of where I move the mouse). When the sound is complete, the button returns to it's first position.

Any ideas?

Sound On/off Button? Anyone?
hi

I am making a movie with several sound effects all inside different buttons. I would like to make a sound on off button to enable the viewer to turn off the sound if he/she wishes.

Right now I have a movie with both an on and off button inside it on the main time line that if you press the off button it then shows the on and vice versa. However I have not been able to come up with the actionscripting to contol the sounds.

I have a feeling that i somehow use the line stopAllSound, but I don't know where and i dont' know how.

Please help,
Michelle

Sound And A Button
i have an invisisble button that i want to start the sound file(that i have in a movie clip, the instance is named). I want it to play than return to the start state . Please help!! Thanks

Add Sound To A Button
How do I add a sound when I release a button, I saw a tutorial that said to do this in the button code:

on (release) {
tellTarget ("/Laser") {
}
}


Laser is the name of my sound but it says target not found. DO I need to do something wiht my sound or if not, what,s the problem???

Sound On/off Button
I have made my site in flash, and it has backround music playing on it. i have put a button on the page to mute the music. i want to make this button turn the music back on if it is clicked again, so it works as an on/off button. please can anyone help, i have tried all i know (not that much) and i really need this button. anyone????pleassse???
[Edited by miki zu broka on 02-05-2002 at 10:42 AM]

Sound On/off Button
ok i made a sound on/off button for my page

how do i make the button so that when i click on it once, it turns off all music, and when i click on it again it plays it again... and so on (instead of having one button for play, and one for stop)
Thanks

Button With Sound
Hi! I wonder how you can make a button that if you for example guess the right answer it will make a sound and if you guess wrong it will make another?

Sound On | Off Button
Hi,

can anyone tell me how to so the sound on | off button, i've been trying to do it, but i haven't been able to do so. Thanks i appreciate all the help you can provide.

Sound Button
I have a site wich I divided into separate movies but there's a sound button I want to put in so the music keeps playing as I change from movie to movie, not like it's right now where if you go to another movie it automatically shuts down and the only way to turn it on again is to click it.

for any help you may have on the matter thanks

Furnart

Sound On/off Button
Okay... I used the 'on mouse event> press> stop all sounds' for my stop button, but I can't find an equivalent to start my music again... Is there one?

Also, If anyone can tell me the difference between flash 5 (which i have) and MX it would be nice... Is it worth upgrading?

Cheers
Lev

.wav Or Mp3 For Button Sound?
I've got some sounds in my Flash movie that are currently .wav files. They play when the navigation buttons are rolled over and clicked on.

Because of the size of the files, it's causing a problem when the movie loads, so I'm thinking I need to either stream the sound or drastically reduce audio quality to make the files smaller.

Is there a way to have the preloader ignore loading those files and go directly to the main movie (which is an animated building of the nav menu) when everything else is loaded? That way, the nav menu can visually build and it doesn't matter if the button sounds are loaded or not until the user actually tries to press a button.

As an alternate solution, would mp3 be a better format to use? Smaller in size?

Or maybe there's a better way to do all this? All I know is that when I test the movie at 56kbs, it comes to a crashing halt when the buttons are being loaded, and takes way too long to catch up.

Thanks for your advice!


Devon

Mad Button Sound Help
hmmmm okay need help....

i have mad a button that stops the music loop...

http://www.madmental.com

but i want the button to also start the loop again...


Start/stop button...
but iv alead mae my movie if u look at my webby^^^

how would i make the button do this???

thanks all

Sound On Button
How do I add sound to a button when you click on it?

On/off Button For Sound
I'm trying to make an on/off button for sound, but the sound doesn't turn off .
here's the code:

//Frame 1:
play_cut = true;
_root.song = new Sound();
_root.song.loadSound("new_song.mp3");
if(play_cut == true) {
_root.song.start(0,9999);
}
if(play_cut == false) {
_root.song.stopAllSounds();

}

//Button:
on(release) {
if(_root.play_cut == true) {
_root.play_cut = false;
}
if(_root.play_cut == false) {
_root.play_cut = true;
}
}

Sound Button...
hi!
i have a background music and a videoclip i want to control the background music with a button..
the background music sounds when scene is loaded, the movie-clip is in another instance.
I have made a button to stop bg music and to re-start it.
But everytime i click to re-start the sound the movie StopsAllsounds, but i want that the movieclip sound continues.
i have try a lot of things but nothing...
how can i change it? help please!
Can someone tell me the code that i have to put in the button?
Button has 2 images: 1 frame STOP and next frame START


thx
[Edited by tiriti on 07-30-2002 at 04:26 AM]

Sound Button
Hi

I'm new to the board and already i have a question, ain't that cool. any way my question is this:

i made a simple button and i would like to have a sound to it so that when you place the mouse over the button the song will play and when the mouse leaves the button the sound will stop.

also i want to play a movie clip during the song and for it to stop as well when the mouse is off the sound button.


Any help would bring many thanks :-)

MC Button Sound FX
I am using MCs as buttons (can't use buttons because of the components) and I want to put an FX onRelease(MC)

Tks.

Sound To Button?
hi.......... how do i link a wma file (that i have uploaded to my server) to a button so that when a user presses the "ON" button, it will start playing music, and when they press "OFF" it will stop? thx

(F5) Button And Sound Help Please
(Flash 5)

Ok guys, I am trying to get a button to work by pressing keys.

Problem 1) I want the keys that are pressed to be `,1,2,3,etc... and those keys aren't in Flash's actions, can they still work? Or do I have to use keys like SPACE, RETURN, etc...???

Problem 2) Here is the code I'm using. I also want a sound to be played while the button is going down. The sound is in the "down" of the button, but I linked it. THe linkage name is "sound1" here is the code;

onClipEvent (enterFrame) {
if(Key.isDown(Key.SPACE)){
with (sound1) {
play ();
}
}
}

What is wrong?

Thanks

Button Sound
I am looking for a "good" tutorial on how to effectively apply a sound to a button.

A person suggested the following method, which seems to be solid, but I have not been able to recreate it successfully.

Here's the method:

1. using the "linkage" option on the sound and assigning an identifier name such as rollOver1

2. then in the first frame placing:
rollOver=new Sound (rollOver);
rollOver.attachSound("rollOver1");

3. then creating a blank movie clip and dragging it to the stage, giving it an instance name of rollOver

4. finally, adding this code to each instance of the button :
on(rollOver){
_root.rollOver.start();
}
on(rollOut){
_root.rollOver.stop();
}

How Add Sound To Button?
Hi helper,

could u tell me how to add sound to
a button?

Thanks

Sound On/off Button
Hi, In my main swf a soundloop gets loaded into level1.(It"s actually a swf file).I have 4 buttons in the main swf.They each load a soundloop into level1.First the code unloads the content wich is stored in level 1 and loads it with a new one(swf) into level1.This way I could use different sound for each button.

Problem is in the main swf I want to add a new button.A sound off ,sound on button.If I press the button, content in level1 should be unloaded.This is no prob only when I hit but1 ...4 it loads new content into level1.How can I script this so when hitting the sound/off button it prevents from loading content into level1 when
I hit one of the 4 buttons.

btw here's the code I used on these buttons(4 buttons)
/ button1 for song 1
on(release){
_level1.unloadMovie(); // empty old song from level 1
loadMovieNum("soundloop1.swf",1); // load new song in level 1
}

Big thx in advance,grtz

Help With Button Sound
I have a button that plays a sound on rollover. Problem is, that when I press the button it plays the sound again. With the rollover sound being that of a human voice, it can get annoying hearing the sound twice in a row. Once for rollover and once for click. Am I missing some code to make this stop. My general code is this:

on(press){
_root.gotoAndStop("section2");
stopAllSounds();
}

The stopAllSounds(); command works fine to stop the sound of it repeting on rollovers but something is missing. Does this makes sense?

Sound Button Help
I have a program where I am adding onle of those "talker"things on it (one of those things where you click on the button and it says what you click on). Well I am having trouble getting the sound to play with the click of the button. Isn't their a way to add a code into the action script where it will play that sound and stay on the same page?
Thanks for the help!

Sound On/off Button
hi. right, i've got a problem with a sound on/off switch, firstly i'd like the sound to play when the scene is entered but the code i'm useing means you have to press the on/off button to get it to play, i've played about with the code but all i can get it to do isplay about 30 different samples all at once, this i think is a symtom of the seconed problem.
secondly, when you click the on/off button to turn it off, the sound repeates so you have multiples of the loop playing rather than it turning off. if anyone could help me with this i'd be eternally greatfull. this is the code i'm useing:


Code:
on the first frame:

mySound = new Sound();
mySound.attachSound("koala");

isSoundPlaying = true;



Code:
on the button:

on (press) {
if (_root.isSoundPlaying) {
_root.mySound.stop();
_root.isSoundPlaying = false;
} else {
_root.isSoundPlaying = true;
_root.mySound.start(0,1000);
}
}


thx, Squid.

Button Sound?
I know how to make a button, and put the sounds into Flash MX. But how do I make it to where when I click on the button it will make a sound?-thanks

Button Sound...
I am having the hardest time tryin to figure out how to make a sound play when I click on a button. How would I do this?-thanks

Sound Button Help Please
Hi i know this is probably the easiest thing ever! But i just cant get it to work.

I want sound to automatically play, and when i click the sound button it stops, and when i press again it plays. But i need the sound to play accross scenes.

Please please can someone advise
Many thanks
Alex

Sound Button Help Please
Hi i know this is probably the easiest thing ever! But i just cant get it to work.

I want sound to automatically play, and when i click the sound button it stops, and when i press again it plays. But i need the sound to play accross scenes.

Please please can someone advise
Many thanks
Alex

PS this isnt the sound i want to play, just used due to small file size

Sound On And Off Button
I'm trying to make a sound on and sound off button. Once you click on the sound on button, I want the button to change appearance for the off state. THen I want it to go back to the on state when the user clicks again. Also, I have looping sounds and when you put a stop all sounds action on the button, sounds stop for a few seconds and then come back on. Any help?

Sound On Off Button Help
hi guys bit of a newbie, need some help please.

got an animation looping with 4 synced event sounds.

what i want to do is create a simple button that turns off all sound when clicked but allows the animation to continue, then turns sound back on when clicked, so it is still in sync with the animation.

I have a coloured button which I simply want to change to another colour when clicked, and then back when clicked again, turning the sound off and on. Do I need 2 buttons for this or can I combine them somehow with scripting?

I have an inkling I may have to combine movie scripts and complex scripting, and maybe sound objects, which I've heard of but never used, but get a bit lost beyond the basics and so I'm making it up as I go along.

Any help would be appreciated, as I gotta show the animation to an important someone tomorrow, and an on/off switch for the sound would definitely make for more impress points.

thanx

Sound Off/On Button
Can someone PLEASE HELP!....Im trying to make a button in Flash MX that will turn OFF the sound and when pressed again resume the sound in the correct position relative to the rest of the clip.....Many Thanks!!!

Button With Sound Help...
hey guys, im trying to create a navigation thats sort of dynamic... atleast the only way i know. anways, i have this movieclip that acts as a button template.. heres my code..

onClipEvent(load){
url = "http://";
btntext = "Home";
}

onClipEvent(enterFrame){
this.onRollOver = function(){
this._alpha = 55;
}
this.onRollOut = function(){
this._alpha = 100;
}
this.onPress = function(){
getURL(url);
}
}

my question is whats an easy way to add 2 different sounds for the onRollOver and onPress states?

thanks for any help!

Button/sound Help
Hi,

I've been asked to work on a Flash project without any Flash background and need help badly.

I need to create a way for a student to take a test only once by clicking on a button to hear a .wav file.

I have a button, that once clicked, will begin streaming audio. The problem is replacing that "start" button with "done" button that returns the student to the web site. We don't want the student to be able to start the audio over again and retake the test.

Just a point in the right direction would be very helpful and appreciated.

Thanks.

Sound On/off Button
hi! hope you can help me
im using flash mx 2004
and sad to say im still stuck trying to figure things out
first Q: what action script should you write down if you want to make a single button that plays the sound fx and stops it when you click it again?
Q2: how do you make the buttom play a movie clip?

hope you guys can help

thanks
keep it cool

Sound Button
Hey all i need a button, which on click stops the music which is already playing, but then on click again, starts the music off again, is this possible, if it is can someone show me the actionascript or what is needed for this to be accomplished?

Thanks!
Matt

Sound On/off Button Help
I looked on the tutorial section and found a great sound on/off button tutorial. It works great except for one thing. Because every page on my flash site is a different scene, the sound ends up over playing everytime a link is clicked... does anyone know of a way I can fix this? Any help appreciated. Thanks!

Matt
http://www.matthewrdaniels.com

Sound Button HELP
Have a normal button that turns the sound on my website (on or off).
The button looks like a little speaker.
What I want is when you click on the speaker to turn the sound off, the speaker will show a slash thru it. Then when you click it again to turn the sound back on, the slash will go away!

Please be detailed in your explaination!

Man is this flash sound stuff giving me a headache!

Thanks Everyone!

Copyright © 2005-08 www.BigResource.com, All rights reserved