ActionScript 2.0 :: Get A Play/stop Function To Work In One Button?
Apr 15, 2009
I am trying to get a play/stop function to work in one button. I know how to stop the play head and start it again with two separate buttons but can't do it with one button that toggles between the two states.
View 5 Replies
Similar Posts:
Jan 3, 2010
I follow this tutorial to T and try look on google but can't answer to this one all want button do play movie and stop when click on the button .here my actionsript 3.0 code can you please tell me what i'm doing wrong.
Quote:
go.addEventListener(MouseEvent.CLICK, startplaying);
function startplaying(event:MouseEvent):void {
[code]...
here error getting in flash cs4 when try test movie
1120: Access of undefined property Puase 1120: source Puase.addEventListener(MouseEvent.CLICK, stopplaying);
View 7 Replies
Nov 3, 2004
I created 3 movieclips each are loaded externally.
videoHolder1.loadMovie(movie1.swf);
videoHolder2.loadMovie(movie2.swf);
videoHolder3.loadMovie(movie3.swf);
I have a play and a stop button. So when user clicks on the stop button all 3 movie will pause and play will resume the movie.
playBtn.onRelease = function(){
videoHolder1.play();
videoHolder2.play();[code]....
What happens is, the play and stop button works fine when running on the Flash Player. However, when I used IE to open the swf file, the movie and everything appears and working, just that the play and stop button won't work in IE or other browsers.
View 2 Replies
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
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
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
Oct 2, 2010
I am trying to stop a function in as3, I tried: delete.functionName - but it didn't work, I tried to achieve the same things using addEventListener and then removeEventListener, but that is not what I need that function has caurina tweener inside it and it has multiple tweens with multiple delays seconds, so all of the tweens are started and the seconds continue to tween but what I want is to simply stop that by stopping the function which holds the tweener so it should stop everything what is inside that function for example it could stop that function when it is mouse hovered on any object
View 11 Replies
May 8, 2010
i started with a Multiple mp3 players project and i more complicated with that - as you see in the picture i try to do that when click on the play button for every song this switch the song that selected -first preloading + percentage the mp3 file and after play it immediately and of course there is stop button, pause button when choose a song the previously that play will be muted
View 4 Replies
Mar 9, 2010
I have two buttons for paly and stop movie.
It is possible to only use ONE button ...
EXample
When click PLAY , stop btn is on
When click Stop, Play btn is on.
My file: [URL]
View 1 Replies
Jan 6, 2010
I have a hard time to find out how I can possibly set my prevFrame(); function to go to previous frame and play instead of stop?My code in the actionscript section (the very 1st line) starts with:[code]
View 8 Replies
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
Jan 3, 2010
im creating a website, and i have scene 1, which is an enter page to the website, with a button set to 'goto and play scene 2' but it doesnt, it plays scene 3, and then i cant get a button to goto and play scene 2 either.
View 6 Replies
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
Jan 25, 2010
I'm trying to fade in a button over a looping video clip however, it fades in and disappears after a few seconds. I tried adding stop() to the button but it stops the whole movie instead of just the button.
View 1 Replies
Jan 27, 2011
When you click the first time on the button, it should start the song, when you click a second time on the button, it should stop the song. how do i make this with actionscript 3?
View 1 Replies
Feb 20, 2011
I am using Flash CS5 and our professor from school has asked us to do a simple project for this weekend however I have been having so much trouble I have no idea what to do. He want's us to create an animation in flash and to use 2 buttons. One that will stop the animation and another that will play the animation. So this way as the animation is playing I can click stop and then click play at random times and the animation will stop or play.I have a buttons layer with 2 buttons on the same layer. One is called start and the other is called stop. I have a seperate layer with a movie clip I created of a moving polygon that goes from one side of the screen to the other. After creating the movie clip I double clicked on the object and created my animation in the new viewer that popped up. Now I have clicked scene 1 and it took me back to my main timeline.
Lastly I have an actions layer with nothing but code. I have made sure to type all my code by right clicking on this 1st frame and going to click actions. Then I typed in my code. Please note that each layer only has 1 frame as they were all edited individually by me double clicking on the object.After inserting the code I have I go to test the movie but get all these compiler errors. What am I doing wrong? Here is my code and the errors I keep getting.[code]
View 4 Replies
Dec 1, 2009
I'm having the worst time figuring this out... Here is the movie I made: [URL] and I want it to stop, then when i press that circle, continue with the animation. right now i have a stop(); on frame 19 the button is named myBtn I have tried all kinds of myBtn.onRelease = Play() but when I do that, i get errors and it no longer stops...
View 7 Replies
Jan 25, 2010
I'm trying to fade in a button over a looping video clip however, it fades in and disappears after a few seconds. I tried adding stop() to the button but it stops the whole movie instead of just the button.
View 9 Replies
Jan 23, 2007
I simply created an movieclip called it themusic as instance and put a sound init Now on the firstframe i added these actions, the problem is the music just keeps going , it has no effect
the code
Code:
play_btn.onPress = function ()
{
trace('playing' + themusic);
//themusic.stopAllSounds();
[code].....
View 1 Replies
Feb 18, 2007
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.
Well my code went like this:
if (roller.stop = true) {
btn.onRelease = function (){
roller.play();
}} if (roller.play = true){
btn.onRelease = function () {
roller.stop();
}}
View 1 Replies
Jul 11, 2011
I'm looking for some help regarding stopping sounds in Actionscript 3. Basically I'm making an interactive story game, basically a quiz game. On the main menu I have a narrator talking. What I basically want to do is have the track stop playing when you press the play button. I have the soundtrack playing already and the play button too. I just can't figure out how to get the sound to stop when I press the play button and it goes to the next scene.
[Code]...
View 2 Replies
Jun 18, 2009
I want to control my animation with a play and stop button .
View 1 Replies
Aug 21, 2009
I have a .mov file and I want to simply encode the video (i assume with flash media encoder) to be a flash file which loops continuiously with a Play/stop button. I'll then have this movie playing on my html page.
View 1 Replies
Oct 7, 2010
I have a flash image-gallery which uses data from XML. I have a previous and next button working, so I can go to the next and previous image. Now I like to have a play and stop(pauze) button in my navigation.
This is my code:
Code: Select all//variabelen
var xmlRequest:URLRequest = new URLRequest ("content.xml");
var xmlLoader:URLLoader = new URLLoader (xmlRequest);
var currentIndex:Number=0;
[Code].....
View 3 Replies
Sep 2, 2004
I'm trying (and failing it seems) to teach myself Action script and I'm having a really tough time with what I'm sure is something that quite easy to do. Basically I have one button. When this button is pressed I'd like it play a movie. When the button is pressed again I'd like to stop playing the movie. In the first frame of the movie I've put a stop action so that it doesn;t repeat itself when it finishes playing. In the last frame of the movie I've put gotoAndStop(2); In my main timeline I have 2 layers each of which has one frame. The button is one layer and the movie on the other.
[Code]...
View 5 Replies
Jun 2, 2006
I want to make one button to play & stop my movie! what is the code?
View 14 Replies
Jul 22, 2010
I have a splash page with a logo. When the logo (splash_btn) is clicked I want it goto the site (frame label: home). All my code seems to be right but the button doesnt work.
[Code]...
View 3 Replies
Mar 27, 2009
I am using flash 8 professional.
I have a custom video player that loads videos from an external xml file. It uses all actionscript to control the video using the attatchVideo(ns).
At present the video starts playing as soon as the video opens, I would like the video to only start playing after the user clicks the play button.
What is the actionscript I need to achieve this?
* all the actionscript for all buttons etc. is on one layer called actions. Videos are external not on layers.
View 3 Replies
Jan 6, 2009
When the movie loads, the music begins to play. I have a single Music On/Off button that can stop and restart the first track. However, whenever the user stops and then starts the music again, I'd like to alternate the track that plays.
As it stands now, only the the first track will play when the button is clicked (and when the movie loads, of course).
Code in action layer:
ActionScript Code:
var song = 1;
var my_sound:Sound = new Sound();
[Code].....
View 3 Replies
Apr 20, 2010
How do I make the playing of my swf go in reverse when the reverse button is clicked? What I want is to have my timeline play in reverse and stop at the previous stop();I have a previous button already set up, but it does not work.[code]
View 8 Replies