ActionScript 2.0 :: Unable To STOP The Music ?

Jul 2, 2009

I have a static page and have set a button to play a certain .mp3 file.The problem is, I can't figure out how to stop the sound, let say, pressing the same button again (and then pressing it again will start the sound all over again... which would be very useful)? I have 1 frame and 2 layers - a background .jpg and 2nd for play button, and actionscript for the button symbol so far:

ActionScript Code:
on(release)
{[code]...........

View 0 Replies


Similar Posts:


Movie Clips And Background Music - Unable To Stop Music At The End Of The Animation?

Apr 30, 2011

I'm working on an animation where I have my "dog" fighting the evil vacuum cleaner. I got most of it to work the way I want it to.

1) I have movie clips entitled pepper_mc (where my dog is supposed to be walking), swirl (where a swirly-type symbol is supposed to spin over the dead vacuum's head), and vacuum_mc (where the evil vacuum is supposed to have a swinging arm (called vacuumarm_mc) that I created using the bone tool). When I add them to the stage and test them, the animations within the movie clips don't happen.

2) I have background music that I'd like to stop playing at the end of the animation, but I'm not sure how to do that. (using the stop(); actionscript doesn't help).Where am I going wrong? I'm using Flash Pro CS5.

Here's the file --> Pepper and the Vacuum of DOOM!

View 1 Replies

ActionScript 2.0 :: Music Separate From Flash File / Still Have Start Stop Music Buttons?

Oct 11, 2009

I want a site to have background music, but when I attach the music to the file it makes it quite large ...3 meg and the site is slow to load. Is there any way of having the music separate from the flash file and still have start stop music buttons?

View 2 Replies

ActionScript 2.0 :: Music To Continue Playing But The GetURL Function Seems To Stop The Music

Dec 13, 2005

When the movies performs the getURL action, I want the music to continue playing, but the getURL function seems to stop the music at frame 152 (where the getURL action is placed), when I wanted the music to continue to frame 257 (the end of the movie). I hope I've explained this clearly

View 3 Replies

ActionScript 1/2 :: When File Loads In The Browser - Music Immediately Plays And Loops Until Click A Button To Stop The Music

Mar 30, 2009

I downloaded a flash template and have modified it to suit our company but there is something that I can't do. When the file loads in the browser, music immediately plays and loops until you click a button to stop the music. On our video page, we have video
that we need to play that has sound in it. How do I get the background music to stop when my video plays without having to go up and stop the music manually. The videos are loaded via an external XML document and there are no buttons in the FLA file to link code to. the website is [URL]

View 4 Replies

Stop Music Playing On My Website?

Apr 30, 2010

I've agreed to helping a friend out to make a few changes to her website.

One of the things I need to do is make the music turn off when you click 'musicff'. It doesn't work at the minute and for the life of me I can't seem to figure it out. Below is the coding on one of the frames [code]...

View 14 Replies

Flash :: Stop Music On Mouse Out?

May 10, 2011

I have a movieclip which has this script attached to it (plays a soundclip on hover) - problem is that if I move the mouse out I need to stop the soundclip. Right now it just starts again while its still playing (on mouse over) == not good.

I tried to make a MOUSE_OUT event and a .stop(); but it does not seem to work.

import flash.media.Sound;
import flash.media.SoundChannel;
//Declare a BeepSnd sound object that loads a library sound.

[Code].....

View 3 Replies

ActionScript 3.0 :: Play Music When Key Is UP Stop When Down?

Jul 17, 2009

The following code plays music when the H key is being pressed and when is unpressed the music stops...the problem im having is that its re-playing the music for every milisecond the H key is being pressed so its creating an endless loop of the sound1, how may I change the code to only play once the sound1 while the H key is being pressed and stop when is unpressed[code]...

View 1 Replies

ActionScript 3.0 :: How To Stop Music From Looping

Nov 16, 2010

how do i stop the music from looping in the code below???// Written.. Happy Chodingstop();// Assign The URL to the mp3 to playvar req:URLRequest = new URLRequest("images/song001.mp3");// Boolean value for button functions, to switch in the conditionalsvar isPlaying:Boolean = true;// Create the sound object

View 1 Replies

Create A Button To Stop And Play Music?

Dec 23, 2009

I am using flash CS4 AS 2.0.creating a button to stop the music on click and play the music on the next click. Sort of on and off music.

View 12 Replies

ActionScript 3.0 :: Does MP3 Stop Streaming Skipped Music?

Aug 12, 2010

Let's say I click next song, it starts loading the next song, then I click next song again before the first song finishes loading. Will the program continue streaming the first song as well as stream the second song?

Code:
private function NewSong (plus) {
if (sound.bytesLoaded / sound.bytesTotal < 1) {
sound.close ();
} sound = null;
songtimer.stop ();
songplaying = false;
channel.stop ();
[Code] .....

This is the code that handles when a new song is to be played. I would think that the first few lines of code would close the stream if it's still loading but I'm not sure. When I click next song like say 10 times, it takes a really long time for the song to stop buffering and start playing. The main question still remains: Will it continue loading songs I skipped over?

View 1 Replies

ActionScript 2.0 :: Stop All Sounds Except Background Music?

Feb 20, 2011

I have created a simple soundboard, with multiple buttons that play sounds upon release. These sounds are embedded within the 'hit' frames of the buttons. Only one can be played at once, so this has been applied to each button:

on (press){stopAllSounds ();}

This all works as planned so far. However, I would like to have a background music feature that would be exempt from the "stopAllSounds" command and thus able to keep playing regardless of what buttons were pressed (or until a designated stop button was pressed).

View 2 Replies

ActionScript 3.0 :: Stop All Sounds Except Background Music?

Jun 17, 2011

I am working on a website that has 11 sounds in one frame. All of the sounds are external, meaning I have to call each one of them every time I want them to play, which happens when I click on specific MCs in my stage. Each MC I click all sounds stop and the new one starts playing. So far, so good.

But therein lies the problem: I want this to happen but keep background music playing. I have no idea where to start from.

View 1 Replies

Professional :: Stop Background Music When Flv Starts AS2?

Apr 7, 2011

I have a flash game that I have videos between some, but not all questions.I would like to have background music that would play during the questions then mute, or turn off when the video is played, then turn back on when video is completed.If possible, but not required, a mute button could be created that would mute the music and would overide it turning back on as well.In other words the person takes the quiz, when the video plays it shuts off the music and starts it back up when video ends. And if possible, if they select to mute the music before the video plays it will not restart after the video completes.I did this in actionscript 2. The questions are on frames 1-50, the videos are on frames 100-110.I have it set up when a question is answered it goes to the video then back to the next frame for questions when it completes.

View 1 Replies

Professional :: Stop Music With The Click Of A Button?

Oct 13, 2011

I have a Start button on the title screen. I want the music to stop when you click on the start button. Also, I want for another music to start when you go to the next part of the animation and to stop when you click on another button.

View 5 Replies

Stop IPhone Playing Music When My App Starts?

Jan 14, 2012

I have produced an app for iOS but when it loads the music from the iPhone doesn't stop.
 
I have read on forums that if an app contains sounds that the iPod will fade out but it doesn't for me.  I have tried loading the sounds dynamically (these sounds don't play at all if the iPod is playing) and embedding them into the movie.  Nothing seems to work sadly.  I have ensured that I have all the recent updates for flash and the air packager and I can't find a solution to this anywhere.

View 1 Replies

ActionScript 1/2 :: Button To Start And Stop Music?

Jan 26, 2012

I'm fairly new at AC2 (Yes, I need to update), and I have Flash CS3.I need to find out if I can have a button that when you click it, plays a music file, and then when you click it again, the music that was playing for that button would stop.I have a text box on top of a rectangle and I selected them both and converted them to a button symbol, named it MusicFile, double clicked on the new button, inserted a new keyframe in the timeline on "down" (where it says Up, Over, Down, Hit), and then dragged the music file from the library onto the button. It works fine, until I click the button a second time, and it just keeps playing as if I pushed play twice and two copies of the sound started playing.Is it possible to make the button play the music when it's clicked the first time, then stop the music that it was just playing the second time it was clicked?

View 1 Replies

Actionscript 3 :: Stop Music After Scene Ends?

Dec 25, 2011

I got this animation homework. I wanted to put a couple of bgm in it. I placed the first one, and it refuses to stop when the scene ends. I place the music in a individual frameline but it doesn't stop when frames end. So, I insert a keyframe behind it, and put this codes :

import flash.media.SoundMixer.*;
soundmixer.stopAll();

In which I got the errors : definition of flash.media.SoundMixer could not be found (twice), for line 1 access of undefined property soundmixer, at line 2. I also tried stopAllsounds; , which is also undefined (even after I import flash.media)

(ps: there is hardly any codes inside this animation - it only has the codes for the replay button)

View 1 Replies

ActionScript 3.0 :: How To Stop Music Playing Automatically

Jul 9, 2009

I've used a example mp3 lpayer built in flash to put on my website. I've tweaked it so that it fits my design and it seems to work ok. The problem is the music starts playing automatically where ideally i want it to play when the user hits the play button.

Below is the actionscript, can any1 tell me how to stop it playing as soon as the flah file loads?

ActionScript Code:
// Flash MP3 Player XML
// Developed by [url]www.flashmo.com[/url]
import mx.transitions.Tween;
import mx.transitions.easing.*;

[code]....

View 2 Replies

ActionScript 3.0 :: Stop Music Playing Automatically?

Oct 27, 2009

i am trying to stop the music playing straight away, and instead only when the button is clicked.

Code:
//Stop at this frame
stop();
//Create a new sound object

[code]....

View 2 Replies

ActionScript 3.0 :: Stop And Start Background Music?

Feb 7, 2010

I have background music playing by using this code:

Code:
var request:URLRequest = new URLRequest("loop.swf");
var loader:Loader = new Loader()
loader.load(request);

this works great for playing the music but I don't know how to have a pause and restart button for the music.

View 7 Replies

ActionScript 2.0 :: How To Stop Background Music On Certain Event

Apr 11, 2010

I have music player when the swf starts and loops continuously or until "music off" button is activated. I would like the music to stop when a certain page is called or if that can't be done then when any button of the main menu is selected.

View 6 Replies

ActionScript 2.0 :: Stop One Sound With Background Music?

Apr 20, 2011

I'm triying to stop a sound of a button, while you hear a background music. The music is assigned in the timeline for the animation. When the animation stop at a specific frame (activity), the button are showed. At this point is all ok.

I don't understand... I am very specific to wich sound must stop. Is there a bug?

In AS 3.0 is more easy when you use the SoundChannel, but in AS 2.0 ?

View 3 Replies

Actionscript 2.0 :: Stop Music Playing In One Swf When Another Swf Starts?

Oct 26, 2010

On my main SWF Home File i have 2 swf files are loaded into my (main home swf) and everything is runing smooth BUT the problem is when i want to watch the video the music is still playing i have to click on the button to stop music playing.

what i want is when i click on the video to play i want automatically the music to stop playing with out me clicking the mp3 button to stop the music playing.

NOTEKeep in mind i have 2 SWF files that are loaded in to the main swf file ...Home SWF is the main file

MP3 SWF << Loads on Home SWF
Video SWF << Loads on Home SWF

All i want is when the video is playing automatically stop the music and when the video is finish the music automatically continuing from where it was left.

View 1 Replies

ActionScript 2.0 :: Stop Music If A Button Is Pressed?

Sep 2, 2005

how would i stop music if a button is pressed? on (release) { stop.street.mp3?? or somthing like this?

View 2 Replies

ActionScript 2.0 :: Play And Stop Buttons With Music?

Sep 15, 2007

i want to create a small music player (that play only 1 song) which contains- a Play button - button symbol a Stop button - button symbol a title (show what song is currently playing) - movie symbol music - i guess movie symbol

the only problem i couldnt solve (the rest are working fine) is that the play and stop buttons arent working. the scripts i wrote for them are:

on(press){
a.play();
}

[Code].....

respectively, while "a" is the instant name for the symbol which contains the song.

i think i figured out that the problem is that in the music symbol there is only 1 frame (which contains the song- i just went to frame #1 and dragged to the edit screen the song from the library).

View 2 Replies

IDE :: Continuous Music Loop Regardless Of Stop(); Actions?

Apr 29, 2009

i just want to have my music looping forever regardless of the timeline stopping and starting. is this possible?

View 1 Replies

ActionScript 3.0 :: Stop Music Playing Straight Away?

Nov 2, 2009

i am trying to stop the music playing straight away, but instead only when the button is clicked.

Code:
stop();
//Stop at this frame
var music:Sound = new Sound()

[Code].....

View 6 Replies

ActionScript 2.0 :: Stop One Music File When Play Another?

Nov 23, 2009

I'm developing a band site and currently have all the song clips playing and stopping via start/stop buttons. The issue is that all of the songs can be playing at the same time if you don't manually stop the other songs. The idea would be to have a song stop automatically if a user pushed play for another song.This is all the AS I have on the button right now:

Code:
on (release)
{

[code].....

View 1 Replies

ActionScript 2.0 :: Stop Music From Playing OnLoad?

Jun 23, 2010

I have a pretty easy question for you Flash gurus regarding a script I am using toplay MP3s via an XML file. The example I found does the job just fine, but it plays the 1st song right away when it loads. I would like to stop the song from playing on load and let the user activate it by pushing the play button instead.[code]...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved