ActionScript 3.0 :: Play And Stop Buttons With ASC3

Apr 10, 2009

I want to have two "play"  and two "stop" buttons to control 2 different mp3 files within the same frame(page). One Play and one stop per mp3 file.
 
I use the code underneath that works just fine with one sound. But, how do I apply action script 3 to control the "play" and " stop" of the second Mp3 file. I tried creating new buttons with action script 3 in a new Movie clip but, I get a bunch of errors

var req:URLRequest = new URLRequest(Pounding.mp3;
var sound:Sound = new Sound(); var controller:SoundChannel;
function soundLoaded(event:Event):void { controller = sound.play();

[Code].....

View 9 Replies


Similar Posts:


ActionScript 3.0 :: Play/Pause And Stop Buttons?

Mar 20, 2010

I can do this in AS2 but am struggling in 3.  I've got the Play/Pause working and toggling and the Stop button stopping but I can't get the Play/Pause to toggle when the Stop button is pushed.
 
Here's my code:
 
var isPlaying:Boolean;var soundChannel:SoundChannel = new SoundChannel();var sound:Sound = new Sound(new URLRequest("commercial.mp3"));xstop.addEventListener(MouseEvent.CLICK, clickStop);xplay.addEventListener(MouseEvent.CLICK, clickPlayPause);

[Code]...

View 4 Replies

ActionScript 3.0 :: Stop And Play Buttons To A Slideshow?

Dec 6, 2010

How would I go about adding stop and play buttons to a slideshow?

stop1.addEventListener(MouseEvent.CLICK, stop1);
play1.addEventListener(MouseEvent.CLICK, play1);
function stop1(event:MouseEvent){

[Code]....

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 :: Control Sound With Play And Stop Buttons?

Mar 29, 2004

I am trying to control Sound with actionscript and play and stop buttons.

This is the script I have in frame one of my scene.

[Code]...

playB is the instance of the play button stopB is the instance of the stop button the sound intro is on its own layer and is selected as a streaming sound. My problem is that when I stop and start the sound with the buttons the sound starts from the beginning instead of playing from the frame it is in.

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

Professional :: Create An Audio Player With Play, Stop, And Pause Buttons?

Apr 16, 2010

I want to do something that is probably very simple, but I'm having difficulty.
 
I want to create an audio player with play, stop, and pause buttons that I can then import into Fireworks/Dreamweaver. 

View 2 Replies

ActionScript 1/2 :: Make Audio Play And Pause / Stop When Different Buttons Pressed?

Jun 12, 2010

I am making a simple radio interface and i have 6 preset buttons which i want to have play the specific preset button's song which is in the library and stop/pause the current song when any preset button is pressed.

i tried using the attachSound function, with associated identifiers but not sure if that is the right way to go. It plays the songs, but doesnt stop them.[code]...

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

ActionScript 2.0 :: Doesn't Appear To Be Any Play Function Overwriting Buttons Stop Command

Feb 15, 2011

I have been given a rather long and complicated Flash movie which contains a number of bugs. The one that has me most perplexed is as to why the pause button is failing to stop the root timeline.[code]As you can see, the button also controls various mps "voiceovers", which stop and start correctly, yet the timeline animations continue to play.I have looked through the movie and there doesn't appear to be any Play function overwriting the buttons Stop command.

View 3 Replies

ActionScript 2.0 :: Simple Audio Player With Stop / Play / Pause Buttons?

Jul 8, 2011

I'm struggling with a script to make a simple audio player. I'm loading the audio externally, using loadMovie. I have three buttons on stage ("Stop","Play", and "Pause"). First two work nicely, problem is the third one. here are the actions for the three buttons:

STOP button - Working

ActionScript Code:
on (press) {
audioContainer.unloadMovie(10);
}

[code]....

BTW, the external movie clip contains an audio track inside a movie clip. Any ideas how to make the thrid button to "pause" the audio?

View 8 Replies

Professional :: Using Default CS5 Skin, Play/pause And Stop Buttons Disabled Until Going Fullscreen?

Sep 27, 2010

We are using default CS5 skins with an flvplayback component built through action script 3.  When playing certain videos (and only certain videos, however there isn't yet a pattern), the play/pause, stop & seek buttons are completely unresponsive.  They don't change stats on hover & they are unclickable.However, the fullscreen button does always work, and upon going fullscreen and coming back out, the buttons now work again. So far, the problem was seemingly at its worst displaying a video that was encoded with Sorenson spark (an older codec) and we wondered if it had to do with the file itself, the headers, anything of that sort.  But the fact that the skin and buttons work fine once entering and exiting fullscreen - that is perplexing.

View 1 Replies

ActionScript 3.0 :: Create Play, Stop, Rewind And Fast Forward Buttons For An Animation?

May 4, 2011

I was looking for a way to create play, stop, rewind and fast forward buttons for an animation I created in Flash. I found a nice description at republicofcode.com/tutorials/flash/controller_bc/, but after trying the code for stop and play I get the error: Access of possibly undefined property onRelease through a reference with static fl.controls:button.

stop();
play_btn.onRelease=function (){
play();
}

[code]....

View 6 Replies

Professional :: ComboBox Scripting - Connect The Buttons To Goto And Stop / Play On Multiple Labels

Oct 5, 2011

I am using Flash CS5 on an iMAC, running OSX 10.6. I created a file that uses a Combobox on the first frame, and I would like to connect the buttons to go to and stop/play on multiple labels.

View 2 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 :: Continuous Animation Through ASC3

Mar 16, 2010

I currently have an animaion I'm creating in Flash CS4. There are 3 nested movieclips on the main timeline (all on one layer) each in there own frame (1,2,3) and they are also labelled ("strategy", "videos", and "messages") I want the animation to play continously without any interaction from the user i.e clicking buttons e.t.c I'm struggling to link the three movieclips together using ACS3 i.e once MovieClip one has played it will go back to the main timeline and play the second MovieClip on frame 2 and so on. From looking at various forums I thought the gotoAndPlay function may work, would I also need to specify that it is going back to the "root" timeline?

View 5 Replies

ActionScript 3.0 :: Migrating ASC1 TotalFrames To ASC3

Mar 20, 2012

Good to see Flash Kit forum lasting a long time. It's been some time since I was last here. Just upgraded to CS5.5 from Flash 8 and having difficulty migrating a counter to ASC3. Managed to rebuild my other time line controller buttons. The counter is ASC1 and inside a movie clip Total Timeď In the clip are 2 dynamic/variables text boxes. min0 and sec0ď They output minutes and seconds as 2 figures. 00 : 00. With a colon graphic in-between. It takes the old _root._totalframes count then produces the times.

[Code]...

View 2 Replies

ActionScript 3.0 :: Receive XML Data From ASC3 In Asp.Net2 Page?

Mar 22, 2009

i have an ation script code that send SQL statements to an Asp.Net2 page and here it's:

package
{
import flash.display.MovieClip;
import flash.xml.*;

[code]....

and i need the C# code that is written in the Ap.Net page to extract the XML data (SQL statements) and execute the SQL statements on SQLserver2005 and return the result to the actionscript3

View 2 Replies

ActionScript 3.0 :: Get Main Timeline To Stop In The Beginning On Button Press To Play And At The End Stop Again?

Feb 1, 2008

I just got Flash CS3. I'm trying to get my main timeline to stop in the begining, on button press to play and at the end stop again. In AS2, you would just put stop(); on the first keyframe and stop(); on the last key frame and program your buttons accordingly.

The stop(); does not work!!!! It's driving me crazy. What am I missing? I've gone through the tutorials in Flash and they don't work either.Also, if you have MovieClip that contains an animation and you don't want the movie clip to be on a continuous loop how do you stop it from playing. In AS2, I would put a stop(); on the last keyframe of the movieclip's animation. This also does not work in AS3.

View 9 Replies

ActionScript 2.0 :: Play And Stop A Number Of Frames Later Without Using Stop?

Jan 2, 2004

Is it possible to play and stop a number of frames later, without using stop() in the frames? Like when I click a button frame 20 will start playing and it stops 30 frames later, all defined by the actions of the button..

View 3 Replies

ActionScript 2.0 :: Play And Stop A Number Of Frames Later, Without Using Stop()?

Jan 2, 2004

Is it possible to play and stop a number of frames later, without using stop() in the frames? Like when I click a button frame 20 will start playing and it stops 30 frames later, all defined by the actions of the button.

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

Actionscript 2.0 :: Movie Clip Play, Stop And Play On Mouse Event?

Sep 1, 2010

I want a movie clip (let's call it homecontent_MC) with 100 frames play to frame 80 and stop.Then when someone clicks a button on the navigation bar (home, about, services, contact, etc...) homecontent_MC would then begin playing from it's position (frame 80) til it reaches 100, at which point it wouldn't be on screen, and the movie clip that corresponds to the navigation button press (say services_MC...) would start from frame 1 and continue til it stops at it's frame 80...

View 7 Replies

ActionScript 3.0 :: Stop Movie By Using Stop(); But Keep Buttons Working

Jul 1, 2009

I'm making a website using flash,And on my movie it says Welcome to Blah Blah Blah,And then a button appears, To make sure my button works,The writing turns to bold and goes bigger,When the button appears it works and goes bigger, Until it reaches the point in the timeline where it has stop();It stops my movie from looping or restarting which is what i want, But it stops my buttons from working aswell, How to keep my button working but movie stops,If you want me to explain more just ask

View 1 Replies

ActionScript 2.0 :: CS3 - Modify From Just Play To Play/stop (toggle)?

Sep 21, 2009

I have modified the original to include more head shots accompanied by audio clips. I have worked out the playing of the clips on release. I realize now that people may not want to listen to entire clip. Each mug shot serves as the button to hear the person talk. I do not know how to modify the button code for it to be a toggle. I guess it would need to be some kind of "play if, stop if" The only part of concern is loading playing the the audio, no changes need to be made to the rollover functionality.

mugWidth = 60; //change these if you change the size of your mugshots
mugHeight = 60; //change to your mugshot height
//instantiate sound and textformat classes

[code]....

View 2 Replies

ActionScript 3.0 :: Play Next 5 Frames And Stop The Play Head?

Jan 6, 2011

how would you play the next 5 frames if the space bar was clicked and then stop the playhead?

View 4 Replies

ActionScript 3.0 :: Buttons Stop Working After Pressing Other Buttons?

Sep 14, 2009

I have three buttons and when I click the second one, the first stops working (e.g. no trace event and it won't go back to the frame "tab1") but the third still works. Then when I press the third button both the first and second no longer work. If I take out the gotoAndStop lines, the buttons work fine. The subsequent frames simply have stops on them.
 
b1.addEventListener(MouseEvent.MOUSE_UP,b1Pressed);b2.addEventListener(MouseEvent.MOUSE_UP,b2Pressed);b3.addEventListener(MouseEvent.MOUSE_UP,b3Pressed);
function b1Pressed(event:MouseEvent){    trace("b1 pressed"); 

[Code]....

View 4 Replies

ActionScript 1/2 :: Why Does It Play When Stop();

Nov 7, 2009

I have just started with a complete new flash project with only one scene and a few buttons and one movieclip (for a button with sound and animation). Already now at the beginning the problems start - the movieclip plays although I have put in the head timeline:
 
stop();
 
The same problem when I put in the rest:
 
instans1.onPress = function (){ play();}instans2.onPress = function (){ gotoAndStop(50);}

View 5 Replies







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