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


Similar Posts:


IDE :: Play Music File Once Only On Click Of Play Button Until Music Stops

May 1, 2009

Using Macromedia Flash Professional 8.

I have a website banner made in Flash. I have added a music file to it and Play and Stop buttons. I also have a Replay button to replay the banner animation once it stops.

I have put the music on a separate frame so that it will not play automatically when the banner loads. I have made the Play button direct to the frame the music is located at so that when clicked, it will go to that frame and play the music file.

The problem I am currently having is that if I click the Play button more than once, it will play the music file again on top of the current play-through.

So if I click Play, the music will play. Then if I click it again, the music will play again, but on top of the first instance of the music, so two instances of it will now be playing and it sounds horrible.

I would like to make it so that if you click Play when the music is playing, it will not play the music again until the music has stopped.

View 6 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 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

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

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 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

ActionScript 3.0 :: Stop Only Flv Video Sound And Continue The Bg Music To Play

Sep 3, 2010

I made a webiste with bg sound home, portfolio, gallery, contcts. This  are the links. when click portfolio, which contain a flv file, when  clicking the flv file bg music stop and video will play smoothly.But if i  navigate to other links the sound from the flv remains their and my bg  music not playing also.. one code SoundMixer.stopAll();  i got this code  b4, it vil stop all sounds... i dnt need to stop the background music, i  need to stop only my flv video sound.. there's a bg music playing, when  entering to the portfolio section thers a flv video vth sound. i can  stop all other sounds ven playing this flv video but i cant stop this  sound ven navigating to other sections and i need to continue the bg  sound ven navigating to other sections...

View 1 Replies

ActionScript 2.0 :: Stop Website Music / When Clip Starts To Play

May 18, 2010

when you play the short clips the sound of the site keeps playing in the background and the sound of the video plays over the top. Is there anyway to stop the website music when the clip starts to play and when stop or the clip finishes the website sound starts to play again. So you know what I mean the website is URL...

View 1 Replies

Actionscript 3.0 :: Multiple Play/Stop Music Buttons On One Page

Apr 20, 2010

What I am trying to do is have multiple play/stop buttons on one page. I've been watching tutorials trying to figure out the best way to do this, but it seems there are so many different ways. I am making the band's name as the play/stop button (one color as play, a different color as stop). I've successfully done that to one button. What I'd like to be able to do is add anywhere from 3-6 songs (all different bands/buttons) per page.

Also, if one song is playing and another song is clicked, I would like to stop the first song and start whatever one is clicked so there aren't multiple songs playing at one time.

And if it's not too much to ask, once one song is either done playing or another is clicked, if it could go back to the first state of the button, that would be amazing.

I will paste my code below for the button I have. If there is a simpler way to do it, I'm totally open to that. Like I said, there seems to be so many ways to do everything, I'm not sure which is best.

var loadSnd:URLRequest = new URLRequest("Song1.mp3");
var thisSnd:Sound = new Sound();
var sndTrans:SoundChannel = new SoundChannel();
thisSnd.load(loadSnd);

[Code]....

View 3 Replies

ActionScript 2.0 :: Play / Pause Buttons To Stop Then Start Music?

May 23, 2005

How can I get the pause button to stop sounds and music, and the play button to start them up again? As of now, it only stops the animation, and lets the music continue.

View 1 Replies

ActionScript 3.0 :: Audio Controls - Add Play/stop Music Button On The Page?

Jun 15, 2009

I am trying to add a music track to some of the pages of my flash website, I imported the mp3 file to the library and dragged it on the stage and it plays when I test it. I want to add play/stop music button on the page, I dragged buttons from the video components to use, but I have no idea where to start with the code??

View 1 Replies

Professional :: Adding Music - Stop And Play Buttons On Main Page

Nov 9, 2010

I have my mp3 audio clip and made my play and stop button. I am using cs4 and as3. I want to have the play and stop button on my main page but still have the music play when the users clicks onto one of the buttons which takes them to a new page.

View 6 Replies

Recommend Simple Streaming Music Player With Just Play - Pause And Stop?

Feb 24, 2010

I just need something simple, where there is only pause, play and stop buttons. I usually load the music within the flash movie and play from there, but I would like to build one where if you press play, the music loads and plays streaming on the spot. I have got a couple of more complex streaming style mp3 players but I would like to use a simplified streaming version. Any recommendations or code that I can just add to a button?

View 1 Replies

ActionScript 2.0 :: Create A Flash Music Player - Play - Pause - Stop - Volume And Show The Track?

May 12, 2008

the player needs to have a play, pause, stop, volume and also needs to show the track I'm currently listening to (play list).

View 1 Replies

ActionScript 1/2 :: Make The Music In This File Play Only Once?

May 8, 2011

What action/script do write to make only the music stop looping?[URL]... Im using AS2 . Im kinda new to flash so can you please explain thoroghly.

View 7 Replies

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 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

Professional :: Create A Music Flash File That Will Play On Every Page Of The Website

Sep 16, 2010

How can I create a music flash file that will play on every page of the web site, I am going to have about 7 pages.

View 1 Replies

ActionScript 3.0 :: Play / Stop Button - Current Audio File To Play The Next One

Feb 27, 2012

I have created two buttons for separate audio files. Essentially if you click on the button it will play and stop. This works great! I have also injected a SoundMixer.stopAll(); to ensure if you click between both buttons that it will stop the current audio file to play the next one. My problem is when I select the 2nd button for the first time everything seems to be working...it's when I attempt to click on the first button again, that it will require 2 clicks and then it stops and plays accordingly...anyone know how I could eliminate this annoying two click process?

[Code]...

View 1 Replies

Flash :: Play Music On Site Preventing Easy Direct File Download?

May 12, 2010

I'm starting a blog with a hosted wordpress instance and i would like to be able to stream music using a flash player on some posts.The problem is that every player i find uses a simple param to get the file url which makes it very easy for someone to find that url and just download the file.I know that it's probably impossible to prevent this all together, but i at least don't want it to be obvious.

View 4 Replies

ActionScript 2.0 :: Bar - Play And Stop Button To Play And Stop Frames In A Flash Movie

Dec 1, 2004

give me the actionscript for a bar that has a play and stop button to play and stop frames in a flash movie. i would be gratefull if you could as i am really stuck

View 2 Replies

Professional :: File Structure - FLV Video With Play And Stop SWF

Jan 4, 2011

I am trying to import a video in to flash. I have converted it to a flv and used the stream from flash media server option and selected a standard play and stop bar. I have imported it in and it works find when you just select the individual swf that it loads into. The problem im having is that when I go to it through the home page, all the page loads apart from the video. I've tried moving it around, moving where all the assets to the video are etc. I know the file structure is important to this working. I have a main folder called interactive / and in that have a FLA and a SWF folder and the swf and fla home page. Currently I have the the video swf in the swf folder with the flv and the play and stop swf.

View 7 Replies

ActionScript 1/2 :: Pause, Stop, Play A Sound That Is Loaded From The Other .swf File?

May 6, 2009

Pause and Resume external SWF sound filesI have this code that plays the sound through linkage. It reside in scene1.fla -> scene1.swf.

var mc:MovieClip = this.createEmptyMovieClip("mc",1);var myLoop:Sound = new Sound(mc);myLoop.attachSound("bg_sound");myLoopVolume=0;myLoop.setVolume(myLoopVolume);
mc.onEnterFrame = function () {  if (fadeIn01==1) {  

[code].....

View 1 Replies

ActionScript 2.0 :: Pause / Stop And Play Buttons To Control MP3 File

Jan 17, 2007

I am trying to make a play, pause and stop btns controlling a mp3 file which is in the library which has a linkage id of Speakers. I've manage to get the pause and play to work but now incorporating a stop button isn't working for me

Code:
var snd:Sound = new Sound();
snd.attachSound("Speakers");
btnHalt.onRelease = function() {
snd.stop();
} btnResume.onRelease = function() {
snd.start(snd.position / 1000);
} restartbtn.onRelease = function() {
snd.start();
}

To say basically if you have pressed the pause btn, then the play btn, play from state pause at, but if you have pressed the stop btn then pressed the play btn, play from start and also if the play btn has been pressed and the audio is playing if pressed again dont play again do nothing.

View 5 Replies

ActionScript 3.0 :: Controlling Sound File With Play Stop And Mute Button

Oct 6, 2010

the method for stopping/playing sound in 2.0 don't work for 3.0. i can stop the sound by going to a different page/frame on the site.but i want the buttons.

1. play button?

2.stop button?

3.mute button?

View 1 Replies

ActionScript 3.0 :: Add A Sound File To Project With Controls To Stop And Play And Volume Slider

Dec 6, 2009

I'm new to Actionscripting and I want to add a sound file to my project with controls to stop and play and a volume slider. I'm using this actionscript for the controls. It works but right now you need to click the play button for it to start. Is there a different way to write it so that the music starts playing when the scene starts, and then the user can stop or play it again and change the volume?[code]

View 3 Replies

Play Music In Flash Player By Clicking Play Button Which Is In The Webpage (outside Flash)

Feb 14, 2012

I want to play the music file in flash player (which is embedded obviously) by clicking the play button which is in the web page (not in flash player).

View 2 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







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