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


Similar Posts:


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

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

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

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

Professional :: Link Audio To Button To Make It Play And Stop On Click?

Mar 2, 2010

I am trying to connect audio to the button so when I click on the button music it starts playing and when clicked again music stops.

View 5 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 2.0 :: Stop Music Playing In Audio Player Automatically?

Jun 20, 2010

I'm by no means up on my AS at all and this MP3 player I've had for a while and just readjusted to suit my needs.

One thing i really want to change is the fact the music starts automatically. I changed line 38 from True to False which does indeed stop the music playing on load but instead i get "Loading" and it doesn't do anything after that. Hitting play won't work.[code]...

View 5 Replies

ActionScript 2.0 :: Stop Music Playing Audio Player Automatically?

Jun 19, 2010

I'm by no means up on my AS at all and this MP3 player i've had for a while and just readjusted to suit my needs.

One thing i really want to change is the fact the music starts automatically. I changed line 38 from True to False which does indeed stop the music playing on load but instead i get "Loading" and it doesn't do anything after that. Hitting play won't work.

Code:
stop();
playlist = new XML();
playlist.ignoreWhite = true;

[Code].....

View 3 Replies

ActionScript 3.0 :: Audio Toggle - Mute / Play Music Again In SWF?

Dec 30, 2011

I call it a hiccup because the code works; but it's backwards. When I hit the audio button it plays the music and when I hit it again it stops the music. I wish for the music to play automatically when you enter the SWF and then you hit the button to mute the music if you wish; and then hit the button again to play the music again.

Here is the code I have:
toggleButton.addEventListener(MouseEvent.MOUSE_OVER, rolloverToggle);
toggleButton.addEventListener(MouseEvent.MOUSE_OUT, rolloutToggle);
toggleButton.addEventListener(MouseEvent.CLICK, toggleClick);
toggleButton.buttonState = "On";
var song:Sound = new TitleMusic();
[Code] .....

View 7 Replies

Professional :: Add Controls Like Play, Stop, Pause

Apr 9, 2007

I just want to add controls so that people can control if they play or pause or stop the animation when I export the fla.

View 3 Replies

ActionScript 3.0 :: Music To Stop And Continue Once Leave That Page

Oct 11, 2011

I created a flash site with four pages with music playing in the backround. on one page I want the music to stop and continue once you leave that page.

View 2 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 2.0 :: [FMX] Play And Stop Controls For Dynamically Loaded Movie

Mar 31, 2004

i got a swf, which i've dynamically loaded into an mc called pitch_mc . After loading it want flash to stop the file from automatically playing, then have play and stop buttons that trigger the movie.

I can load movies fine, but i havent used transport buttons yet :S

View 5 Replies

ActionScript 2.0 :: [FMX] Play And Stop Controls For Dynamically Loaded Movie?

Mar 31, 2004

i got a swf, which i've dynamically loaded into an mc called pitch_mc . After loading it want flash to stop the file from automatically playing, then have play and stop buttons that trigger the movie.

View 5 Replies

ActionScript 3.0 :: Page With Several Buttons That Play Music?

Dec 16, 2009

I made a simple page with several buttons that play music, but then decided I wanted a video (flv) to first play automatically, and when that ends the page with the buttons appears. How can I do that? Right now I have four layers using one frame. Layer one has the AS code, two has the text, three has the buttons and the fourth layer has a background image.

View 7 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 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 3.0 :: Play/Pause/Stop Controls Inside Document Class?

Jul 13, 2009

I'm creating a photo gallery using pure AS3. Currently I have a Document class that is a Sprite with a timer to switch out images, and I need to add Play/Pause/Stop controls to this class using pure AS3 (no adding buttons/symbols to library or stage).

View 1 Replies

Flash :: Music Player Stop Working - Embed It Into Index Page?

May 3, 2010

Inside my /test folder/music_player/ have have a file called mini_player.swf. If I play it without embedding it anywhere, like this: [URL].. everything is OK. But when I add it into my index page: [URL].. the song doesn't start.

[Code]...

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

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

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

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

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

Stop Video Audio When Clicking On New Page Of Site

Aug 5, 2009

The situation is I have a number of pages with a single movie clip on each, however once the movie is playing and you click the home or contact buttons for example, it will go to the correct page but the movies sound keep playing in the background. So I've got a code, but I just get an error sayign tanmovstop() does not have a body. I'm very new to action script so am very lost! I'll be extremely grateful. The code on the sites main buttons is as follows, with tanmov being the movie whos sound I want to stop:

[Code]....

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







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