Play And Stop Button For Sound
hey people how can i make a play and stop button for my sound on my flash movie?
I am Using flash 5.
Ps. I have a stop button and a play button.
FlashKit > Flash Help > Flash General Help
Posted on: 08-07-2003, 10:32 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Play And Stop Button Sound
hey people how can i make a play and stop button for sound on my flash movie?
I am Using flash 5.
Ps. I have a stop button and a play button.
Play And Stop Button For Sound
I would like to create 2 simple buttons fot example a round button for playing my sound and a triangle for stopping my sound.creating the buttons and stuff is not the problem but i dont know wich actionscript i should use to get the sound started en stoped when i click on my button?
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.
Straming Sound With Play And Stop Button
i have created a stop and play buton which is controling a audio loop on my current website. But how do i get the sound to loop automatically without the user having to press the play button for it to play. whilst still having the option to stop it.
thanks to all
tony
One Button Stop/play Sound Object - MX
I'm using MX and taken some Flashkit tutorials on sound objects, but I can't seem to get one thing to work. I'm trying to create one button that, when clicked, stops a sound object if it's playing and start it when it's not playing. I know how to create separate stop and play buttons, but for this project I need them combined into one button. I can get the sound object to stop, but not to play again. Any help would be much appreciated, thanks and have a great day!!!
Laters....
Beginner Question: Show/Hide A Button To Stop/Play Sound
Hello,
I would like a movie clip in my site to either stop or play the background sound. This movie clip is visible by default on a frame. When I click the movie clip I would like it to disappear, stop the sound and be replaced by another movie clip to play the sound again.
In the stop sound movie clip I wrote:
on (release) {
stopAllSounds;
stop._visible = false;
play._visible = true;
}
But it does not work...
And what should I write in the play sound MC?
Thank you for your time.
Cheers
On Press Play Sound On Release Stop Sound
I have a button that is inside a movie clip 'forward'.
When you press the button it plays another movie clip 'time' forwards
on (press) {
forward = "1";
}
on (release, rollOut, dragOut) {
forward = "0";
}
on the button and:
if (forward eq "1") {
tellTarget ("/time") {
nextFrame();
}
}
on the first frame of the 'forward' movie
I would like sound to happen when you press the button and stop when you realease the button
but I not sure how any help would be gratefully excepted
Attach Sound, Play Sound & Stop Sound.
Hey there,
I was wondering if any of you could help me please.
I want to play a song which I have named "rundmc" The file extension is ".mp3"
I want a button to play this mp3 which I read you need to attach that sound, then play it and I want to a button to stop that sound, or preferably the play button to change into a stop button.
I've read the help files, but none of it works and I've changed the linkage for the mp3 to export for action script, but nothing works!!!
Please help,
NK.
If I Stop The Sound I Want To Play It From Where Is Stop :)
hi all
i want a button if i cilck on it the sound will stop and another button if i click on it the sound will continue from where it is stoped is it possible in flash or not
and the sound where is the best place i place it ( movie clip - main frame - action ????
thanks
if any one can give me an open file to be clear or the code
Play/stop A Sound
okay i really need help.. ill attach a sound file.. if someone could plleeasee make an .fla file where a button is set to play and stop some given sound... like an on/off switch.. i would attach my .fla file but its more than 2 mb.. so i really need help.. thnx!!
Sound Play Stop ?
hello all, i have 4 mp3s
i am working in a scrollbar and i just want a simple play and stop button for each one..maybe loaded from an external file...
how i can do that ? any help ?
Mp3 Sound - Play And Stop
I made to player with only the buttons play and stop, I tried to make that button toggle, but I did not works, then I made two buttons, when I click in play it shows a button and hides the other and vice versa, he functions normal, my problem is the following one:
When finishes the music the button not return for stop button, it continues showing to the animation of the play button , How can I make when to finish the music the button comes back to the state where it was.
AS
code:
var mp3Musica:Sound = new Sound ();
//
tocar_mc._visible = true;
parar_mc._visible = false;
//tocar música
tocar_mc.onPress = function () {
tocar_mc._visible = false;
parar_mc._visible = true;
mp3Musica.onLoad = function (sucesso:Boolean) {
if (sucesso) {
mp3Musica.start ();
}
};
// carregar música
mp3Musica.loadSound (_root.musica, true);
};
//parar musica
parar_mc.onPress = function () {
tocar_mc._visible = true;
parar_mc._visible = false;
mp3Musica.onLoad = function (sucesso:Boolean) {
if (sucesso) {
mp3Musica.stop ();
}
};
mp3Musica.loadSound (_root.musica, true);
};
//cor fundo botao
new Color (tocar_mc.fundo1_mc).setRGB (parseInt (cf, 16));
new Color (parar_mc.fundo2_mc).setRGB (parseInt (cf, 16));
Sorry about my English
[CS3] Stop All Sound And Play Next
ok so what i have is a flash based web site on a guitar, my nav bar is the neck of a guitar and the chords are the buttons.
the buttons are movie clips with an animation, i have scripted each movie clip so it stops at frame 1, on rollover play until certain frame, on release play rest of movie clip, script is this:
-------------------------------------------------------------------
var buttonAction:String = "stop";
this.onEnterFrame = function(){
if(buttonAction == "stop"){
stop();
}
if(buttonAction == "roll over" && this._currentframe < 35){
play();
}
if(buttonAction == "roll over" && this._currentframe == 35){
stop();
}
}
this.onRollOver = function(){
buttonAction = "roll over";
}
this.onRollOut = function(){
buttonAction = "return";
play();
}
this.onRelease = function(){
_parent._parent.gotoAndStop("Home");
}
-------------------------------------------------------------------
Script works fine i'd prefer not to change it.
what i want is to play a sound on frame 5 but when i roll over a different button it stops all other sounds from playing then plays the sound in that movie clip.
this is for an assignment due tomorrow so any quick help would be greatly appreciated!
(if i didn't explain enough please let me know)
[CS3] [AS2] Sound Stop And Play
I'm making a game; frame 1 is the main menu and also contains music... Now on the main menu has buttons like "options," "controls," etc.. Now once I click on one of them it goes to another keyframe; and on that keyframe is also a back button to the menu; once you go back to the menu the music is played twice... I want to make sure that dosen't happen. I tried some codes such as stopAllSounds but everything I tried didn't seem to work for this simple problem; so I'm looking for a workaround for this...
Thank you for taking your time to read this...
Mp3 Sound - Play And Stop
I made to player with only the buttons play and stop, I tried to make that button toggle, but I did not works, then I made two buttons, when I click in play it shows a button and hides the other and vice versa, he functions normal, my problem is the following one:
When finishes the music the button not return for stop button, it continues showing to the animation of the play button , How can I make when to finish the music the button comes back to the state where it was.
AS
ActionScript Code:
var mp3Musica:Sound = new Sound ();
//
tocar_mc._visible = true;
parar_mc._visible = false;
//tocar música
tocar_mc.onPress = function () {
tocar_mc._visible = false;
parar_mc._visible = true;
mp3Musica.onLoad = function (sucesso:Boolean) {
if (sucesso) {
mp3Musica.start ();
}
};
// carregar música
mp3Musica.loadSound (_root.musica, true);
};
//parar musica
parar_mc.onPress = function () {
tocar_mc._visible = true;
parar_mc._visible = false;
mp3Musica.onLoad = function (sucesso:Boolean) {
if (sucesso) {
mp3Musica.stop ();
}
};
mp3Musica.loadSound (_root.musica, true);
};
//cor fundo botao
new Color (tocar_mc.fundo1_mc).setRGB (parseInt (cf, 16));
new Color (parar_mc.fundo2_mc).setRGB (parseInt (cf, 16));
Sorry about my English
Mp3 Sound - Play And Stop
I made to player with only the buttons play and stop, I tried to make that button toggle, but I did not works, then I made two buttons, when I click in play it shows a button and hides the other and vice versa, he functions normal, my problem is the following one:
When finishes the music the button not return for stop button, it continues showing to the animation of the play button , How can I make when to finish the music the button comes back to the state where it was.
AS
ActionScript Code:
var mp3Musica:Sound = new Sound ();//tocar_mc._visible = true;parar_mc._visible = false;//tocar músicatocar_mc.onPress = function () { tocar_mc._visible = false; parar_mc._visible = true; mp3Musica.onLoad = function (sucesso:Boolean) { if (sucesso) { mp3Musica.start (); } }; // carregar música mp3Musica.loadSound (_root.musica, true);};//parar musicaparar_mc.onPress = function () { tocar_mc._visible = true; parar_mc._visible = false; mp3Musica.onLoad = function (sucesso:Boolean) { if (sucesso) { mp3Musica.stop (); } }; mp3Musica.loadSound (_root.musica, true);};//cor fundo botaonew Color (tocar_mc.fundo1_mc).setRGB (parseInt (cf, 16));new Color (parar_mc.fundo2_mc).setRGB (parseInt (cf, 16));
Sorry about my English
( Urgent) My MC Can Stop N Play, But How To Keep My Sound Going?
Hi, ppl...regarding the MC which i ask for your help last time, it works..but is there any way to keep the sound going?
cos once i stop the clip, the sound stop n it cant play anymore..Pls help me...thanx..
i need to hand up tis clip today, so ur help will be a very big deal to me...Thanx!
Sound Play And Stop Problems
I've run into an audio problem and I will do my best to explain it. What I have is 1 scene, which contains 2 layers. One layer has my main movie clip and the other has a stop(); command. Inside my main movie clip I have boxes opening with 401k investment descriptions and audio reading them off. At the end of all the descriptions I have 3 buttons that on (rollOver) gotoAndPlay a specified frame and rolls down a submenu containing buttons. If you click one of the submenu buttons it takes you back to the beginning of that button's investment description. My goal is to get the audio to NOT PLAY AT ALL once the timeline has reached the 3 main buttons. When you click one of the submenu button's and it takes you back to where it opens a window, displays the definitions text, and then an exit definition button I want to have the audio totaly dead. And when they click the exit definition button it's told to jump to a certain frame where it clears the defintion text from the window, rolls the window back up and cleared and then jumps to the frame where the 3 button's are. I cannot attach the file because it's 23mb's, obviously file size was not important with this project LOL so... If anyone has a fast connection dsl or higher I can send the .fla to you through MSN Messenger. Or, if you want to take a crack at adjusting my code without having the "many" audio files I could remove all the audio files, which would allow me to attach it. I could even give the frames frame labels where each audio file starts. But I'm not going to do all that unless I have to My MSN addy is andrewj2883@hotmail.com
Thanks,
Stea|th
Sound Play Stop Problem
hello all, i have a small problem
i have an audio player loading 4 separate songs but
they are 4 different PLAY and STOP but
if you listen to the tracks all the way through until they stop themselves, the play button doesn't work again, until you click stop, even if the track has stopped.
any help ?
[F8] Stop/play Sound Behaviors
I want to create three interactive music buttons on a Flash8 website. I tried following the instructions in the help files about controling sound playback using behaviors. I was able to create "play" and "stop" buttons for the three mp3's I want people to be able to play, but only the first one works. All three live in the same keyframe, on the same layer, link to mp3's in the file's library and reference each mp3 as an instance in order to play and stop. Why will only one set of buttons work?
[MX] Sound Stop Then Play Problem
it doesn't start playing angain
Code:
onClipEvent (enterFrame) {
stopAllSounds();
}
on (keyPress "<Space>") {
_root.snd.start(0, 10);
play();
}
Control Sound: Stop And Play
I know that this forum has several posts on this. I've read them, two book chapters, and numerous websites. I have, no lie, 12 versions now and nothing actually works. Everything comes close, but no cigar.
for example, if i have separate play and stop buttons, if you keep clicking on play, you get dozens of your audio at once. In another code, you have to click on the play button twice to get the audio started. in another case, the audio plays once, finishes and then clicking on play never plays it back again.
Sometimes I feel like i've walked into the middle of a movie. A post will say create a toggle button then use this code. But it doesn't say if there's any code itn the toggle button, whatever.
I know this is possible. And I guess I'm a dolt. Can anyone help me. thank you
Play And Stop With Sound In Flash?
Hey guys I am new to to flash I can only create basics animations and stuff but I have been reading books and trying to create a play and stop file using flash but I can't so I found this site which I think is great!!!....and if any of you can help me I would appreciate it so much....by the way I am Matias Bulox from Argentina.
Ok I guess I have explained my problem....I'll wait for somebody to response.
Check my 2 sites
http://www.clearealty.com
http://www.books-softwares-online.com
I am still working on both of them but I need your help!!! please.
Bye and have a nice day!!!
and Merry Christmas for everybody !!!!!
Matias Bulox
Sound Stop/play Buttons
Hi - I am trying to make a background loop which will play automatically when a page loads and to display a stop button which will stop the music when clicked.
I managed to do this much, however, when the stop button is clicked, I would like to display a play button which will start the music again when clicked. I could not figure out how to do this. I've read several tutorials, but some of them seem outdated and others did not seem to work.
Can anyone give me some advice or direct me to a tutorial which would explain how to do this correctly?
Here is the FLA so far: http://www.seniorspin.com/MyMusic.fla
Thanks, Elizabeth
PLAY Sound And STOP Sound
I have no clue how to play and stop sound. I tried everything but I guess I am doing it wrong!
basically...... the name of the clip i want to play is
sound1
i have a little play button and a little stop button
i need the code so that it will play sound1 when clicked on
and the stop button i just put stop all sounds so i guess that should take care of it..but if that is wrong then please let me know, lol
thanks
xox marqi
How To Stop N Play Back Sound At The Same Time
im doin my flash project...n i failed to stop da sound...i try usin da stopAllSound it worked but i wanted to play another sound at da same time....i mean at the scene without playin da first sound...mail me???????? or reply to me as soon as possible....
Streaming Sound Stop/play Problem
Dear all,
I am a flash "advanced beginner' and what I intend to do is this: make a simple streaming mp3 player that loads mp3 file, plays it automatically, but when user changes page (or refreshes) I want to resume playing the song from the very last position before the page has been refreshed (to mimic somehow the continuous play).
Communication works fine through cookies, no problem there. The only problem that I don't understand is when I try to play the sound from specified (read from cookie) position, i.e.: sound.start(fromPosition) - I explain:
I understand that when using streaming sound, it starts to play from the beginning automatically after sufficient portion is downloaded. I thought that I could overcome this by stopping the sound just after loadSound command and then again start it from given position, but this doesn't respond:
myTunes = new Sound();
myTunes.loadSound(somesong, true);
myTunes.stop();
myTunes.start(fromPosition);
song only stops immediately after page refreshes, but doesn't start again..
I have also the play/pause button and there it works (playing from the paused position)
I would be very happy for any suggestions, thanks much..
cheers..
T.
Stop The Sound From One Movie When Another Begins To Play
Hi and Help!
I've been killing myself to get this to work. I have multiple .swf files loading into on file based on button clicks. That part works great! The problem: when you click to load the next movie, the sound from the first still plays. I've tried everthing under the sun. Can someone please enlighten me???
Here's what I have that works (with the exception of the sound):
var fileName:String="begin.swf";
var loader:Loader = new Loader();
var requestURL:URLRequest = new URLRequest(fileName);
loader.load(requestURL);
holder.addChild(loader);
airButton.addEventListener(MouseEvent.CLICK,airBut tonListener);
earthButton.addEventListener(MouseEvent.CLICK,eart hButtonListener);
function airButtonListener(event:MouseEvent):void {
loadFile("air-JWfinal.swf");
}
function earthButtonListener(event:MouseEvent):void {
loadFile("earth-JW.swf");
}
function loadFile(fileName:String):void{
requestURL.url = fileName;
loader.load(requestURL);
holder.addChild(loader);
}
Making Sound Stop And Play In Flash
How do you make sound "STOP" and "PLAY" in flash. Like when you have sound in the background in your flash movie and some people don't like to here sound and they can turn it off. or turn it on
VIDEO PLAY BACK - SOUND (Stop A UIloader?)
PLEASE HELP ME SOMEONE!! I am going to rip my eyes out!
Here is what I have set up:
I have a website... http://www.thedrewblood.com
I have several pages set up on a main time line. Siting on my main time line is a UI loader that automatically loads an mp3 player, which the client wants to play through, with out interuptions. The pages have labeled frames, and the buttons have eventlisteners to move the time line to the specific frame. On this frame (say it is "video") I have a movie clip, with the page content. Inside this movie clip time line I have a ui loader which will load my flv playback component with various video.
So, the video loads perfectly, and everything is fine. However, there are some complexities that I would like to remedy.
when you navigate away from the "video" frame, the sound from the video continues to play. I would like that sound to stop, or is there a way to stop the ui loader?
I want the video to play, and stop as you leave the frame because I don't want the ui loader for the mp3 player to be interrupted.
If anyone can help me it would be greatly appreciated!!
Create Play And Stop Buttons For Movie And Sound
Hey,
sorry if this has already been asked, I couldnt find it.
I have a movie I made and I want to give the user some control by creating play and stop buttons.
I made the buttons, however when i stop the movie it cuts the sound as well (which i want), BUT when i then push the play button, the movie plays but the sound stays off.
Is there a way to make the sound and movie play with a play button?
thanx in advance
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
How To Create Looped Sound Clip With Play/stop Buttons?
Hi everyone, basically, What I want to happen is when the flash file loads up on my page a small soundclip (.wav) starts playing, and it has to be looped so it plays exactly continuously and seamlessly; there can't be a 'gap' when it reaches the end and starts playing again.
I'd like to offer two controls: a stop button so people can stop it, and a play button so they can start it up again if they wish.
If that's too complicated then just the stop button would do.
When I've tried to do this myself the sound loads up again after the stop button has been pressed and the play button didn't work.
Im quite new to flash so a step by step guide would be of great help.
Thank you very much for your time and help.
Kayboard Input To Play And Stop An External Sound File?
Hey all,
I know how to play an axternal sound file, i currently am able to play and stop my sound file with buttons, but i would like to be able for the user to press the 'S' key on the keyboard (or any key if it makes it easier) and then the sound is turned off and on. Can anyone help me on this in AS3?
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
Play/stop Button
i created a play/stop button and it works fine. My problem enlies in the size of it. I want it to fit in a 50 by 50 box and so it wont be needed to scroll. i tried this but it is still too large for the box which is 75x75..Is there any solution?
Play Button And Stop Help.
I have a sword idea that is suppose to have 3 stages of animation. I am tyring to get the play button to play each stage at the end of each animation and start the animation again at the end of the last stage. I'm still new to this and I'm not sure what I'm doing wrong but the button doesn't work and it just plays the entire animation without stopping after each stage. I have each stage labeled where it is suppose to stop but I'm not sure what I'm doing wrong. If anyone could help me out it would be greatly appreciated!
[F8] Stop/play Button Help
Hello- I am new to the forums and need some serious help. I am learning flash, and had to add a play and stop button to a banner with sound. Well, everything is set up but the buttons do not play or stop. I am completely lost, I have tried various action scripts and none work. I think I am doing something in the banner setup wrong, but I'm not sure what. I can send the flash document to someone if that will help. It's 368kb so I can't upload it straight to the post. Thanks a ton.
Stop And Play Button
Hi everyone, i have added sound to a frame, but need to make a stop and play button. Any help would be appreciated.
Help With Stop And Play Button
I have pause button (pausebtn) on frame 1 (with 'stop()') and play button (playbtn) on frame 2 (with 'stop()') of 'moviebtn' and placed the script below in parent. Problem: when button is pressed it goes to frame 2 but when pressed again, it refuses to return to frame 1. WHY??
moviebtn.pausebtn.onRelease = function () {
moviebtn.gotoAndPlay(2);
};
moviebtn.playbtn.onRelease = function () {
moviebtn.gotoAndPlay(1);
};
Thanks in advance for any help.
Help With Stop And Play Button
I have pause button (pausebtn) on frame 1 (with 'stop()') and play button (playbtn) on frame 2 (with 'stop()') of 'moviebtn' and placed the script below in parent. Problem: when button is pressed it goes to frame 2 but when pressed again, it refuses to return to frame 1. WHY??
moviebtn.pausebtn.onRelease = function () {
moviebtn.gotoAndPlay(2);
};
moviebtn.playbtn.onRelease = function () {
moviebtn.gotoAndPlay(1);
};
Thanks in advance for any help.
One Button To Play, Stop 2 Different Mc?
im struggling with this one here.
I have one button that i want to play 2 things at the same time. Then one button i want to stop those 2 at the same time.
Below is what i have and it doesnt work. It only plays and stops mc2.
???
Code:
playbutton.addEventListener(MouseEvent.CLICK, onClickplay);
stopbutton.addEventListener(MouseEvent.CLICK, onClickstop);
function onClickplay(event:MouseEvent):void {
mc1,mc2.play();
}
function onClickstop(event:MouseEvent):void {
mc1,mc2.stop();
}
Play/Stop Button
I have a flash game and want to put a button so the user can chose to have the sound on or off. I have made the stop button and placed it in the scene and I´ve put : on (release) {stopAllSounds();
}
This works, but I really would want a button which shows stop/play in the same button,how do I make this button and what actionscript do I use and where???
Play / Stop Button
this is too easy - but I cant work it out...
I have an MC which plays when movie is loaded. I have a button which I want to use to stop the MC playback. Then when it has stopped, have the same button to make it play. Simple.. yep .. Well my code went like this:
if (roller.stop = true) {
btn.onRelease = function (){
roller.play();
}
}
if (roller.play = true){
btn.onRelease = function () {
roller.stop();
}
}
where have I gone wrrong?
cheers
|