ActionScript 3.0 :: Creating A Stop And Play Button?

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


Similar Posts:


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 :: 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 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 3.0 :: Creating A Stop Button

Jun 19, 2011

I was working on a tutorial from the AS3 cookbook and I made a movie that creates random lines once the move is set in motion by an ENTER_FRAME event. I modified the movie by creating a button to set the movie into action.I am having trouble with a Stop button, I tried a removeEventListener on the makeLines function but it didn't work.[code]

View 2 Replies

Actionscript 2.0 :: Multiple Mp3 Players - Stop Button , Pause Button When Choose A Song The Previously That Play Will Be Muted

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

Professional :: Play/stop Button Change Into One Button?

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

ActionScript 3.0 :: Creating Button To Stop Playing Sound?

Dec 11, 2009

I'm trying to make a stop button to make it stop playing the sound. But I get an error saying:
TypeError: Error #1006: stop is not a function.
at sound/SoundStop()

Here is the function for my stop button:
function SoundStop(event:MouseEvent):void {
cs.stop();
isPlaying:false
}

View 5 Replies

CS3 : Creating A Specific Area To Play Movie/button?

Feb 10, 2010

I've created a widget that that, on roll over, starts an animation and allows the user to jump to a url on clicking the widget. It all works well, except that the whole stage area (209x204 pixels) is sensitive to the roll, and I want to somehow make a specific target area start the animation on roll over.

I've tried putting it into another button and adding a hit state to the button, which did create the specific area I was aiming for, but prevented the movie from playing, creating a weird 'stutter' of the cursor.

View 2 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 :: Can't Get Play And Stop Button To Work

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

Professional :: Stop A Button Over An FLV That Continues To Play?

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

ActionScript 3.0 :: Play / Stop Sound On One Button?

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

ActionScript 3.0 :: Stop Then Press A Button To Play

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

ActionScript 2.0 :: Stop A Button Over An FLV That Continues To Play?

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

ActionScript 2.0 :: Simple Play And Stop Button?

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

ActionScript 2.0 :: Same Button To Play / Stop MovieClip

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

ActionScript 2.0 :: Creating A Stopwatch That Starts At 00:00 When A Play Button Is Pressed?

May 2, 2010

I'd like to create a stopwatch that starts at 00:00 when a play button is pressed, and then stops whenever the stop button is pressed. After the stop button is pressed, I would like the time to be displayed on the next frame, and say something like "You pressed the stop button in x".

View 1 Replies

Track Stop Playing When Press The Play Button

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

ActionScript 1/2 :: Control Animation With A Play And Stop Button?

Jun 18, 2009

I want to control my animation with a play and stop button .

View 1 Replies

Loop A Video With A Play/stop Button In The Middle?

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

Actionscript 3.0 :: Play/stop Button In A FLASH XML Gallery?

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

ActionScript 2.0 :: Basic Button To Play / Stop Movie

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

ActionScript 2.0 :: Make One Button To Play & Stop Movie?

Jun 2, 2006

I want to make one button to play & stop my movie! what is the code?

View 14 Replies

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

ActionScript 2.0 :: Play And Stop Button Won't Work In IE Or Other Browsers?

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

ActionScript 3.0 :: Creating A Huge PLAY Button (YouTube Style) For An FLV Component?

Feb 3, 2012

I have an FLV component and I wanted to create a huge PLAY button in the middle of the screen so if the video doesn't start automatically a user can click on it and it fades out. If the video stalls a user can click on it again and start the video.I would like it to be arranged as follows:1.play_btn fades in on the startMY PROBLEM: I did it it works, but not sure if it is an optimal solution. I did not assign any function as this way tween starts automatically. Or it is better to assign something like ON_START or ON_LOAD and not sure what is the proper function.

2.If the video starts to play on its own without a user clicking a play button it should dissapear and if the video stops it should appear.MY PROBLEM: Presently I achieved it to fade out on the click, but it stays on the screen unless I am to click on it. If I make background of the button to the size of the video then when a video stops and a user just clicks somewhere around on the screen he hits an invisible play button and video resumes. The button does not come up if the video stops..Extra special desire. If a user clicks on the video then it is paused and a button changes to a pause symbolMY PROBLEM: This third option may be too complicated for me with all "if" statements, but if not too much to ask would like to see how it can be done.here is the code I was able to come up with:

var  play_btn_Tween:TweenMax = TweenMax.from(play_btn, .5, {alpha:0});
play_btn.addEventListener(MouseEvent.CLICK, onClick_Play);
function onClick_Play(event:MouseEvent) :void {

[code]......

View 1 Replies

Stop Video From Playing Until User Clicks The Play Button?

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

ActionScript 2.0 :: Alternating Sounds On A Single Play/Stop Button?

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

ActionScript 2.0 :: Create A Button To Play Reverse To Previous Stop

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







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