ActionScript 2.0 :: Play And Resume Buttons With SetInterval?
Aug 27, 2004
Basically, I have a presentation movie with a few complexities to it.
1. The movie Plays, then waits an interval of time, then resumes (works alright)
2. The movie needs to have a pause button (that will pause the action) and a play button that will resume the action.
My problem: Once I pause and then hit play the play button ignores the "countdown" of setInterval and just "skips" ahead to the next part. I'm putting in a voice over and I really need that interval of time there or stuff will run into each other.
On the first frame (but indicative of the rest):
Code:
stop();
/* Sound Stuff */
var mySound = new Sound(this);
mySound.attachSound("soundIntroduction");
I have a long movie and need to make a pause and resume buttons. The problem is that with my current codes start() and stop(), the sound is keep playing (start/event) but picture stops. Any way I can make sound pause/resume as well with those buttons even though it is start or event?
so i need to make a play/pause button on my animation, i can use stop(); to stop the main timeline. i cna use intro.stop(); to stop a movieclip with the instance name intro that is placed on my timeline.
but can I stop every single movieclip (in all different levels) that are in my timeline?
if not, how can i stop movieclipA which is inside movieclipB which is on the main timeline?
I've got a fairly short little animation sequence that the folks here at my work would like to insert into one of our web pages on our site. It's a demo on how to use one of our products, so I'd like to add a few buttons so the user can pause and then resume the entire movie. There is absolutely no scripting applied to the FLA right now.
I've been working on another project that involves scripting some buttons with AS3, so I have some knowledge, but am still having a lot of difficulty,
Is there a way to allow a user to move playhead to any point on the progress bar (including much ahead of the loaded portion of the movie) and resume play from there? Presently a user can skip ahead only as far as the download happened.
Just in case there is no conflict with my set up, here is the code I have:
My Original Post:I have been designing a visual presentation in Flash CS5, there are a few movie clips on the stage that are set to play at a certain time/frame. The problem I am having is that I am not familiar with coding/actions. I want to have a play and a pause button so I can pause at any point (not a specified frame) and discuss with the audience. Then I want to be able to click the play button to resume from that point (wherever I paused from). I hope to get help and be able to learn from your answers. I don't know how clear my question is, but I can clarify if you need me to... A Reply:you can stop/play any movieclip by using the movieclip's reference:
I call a function changePhoto with setInterval.Furthermore I got two buttons (pause and play).Now with pause I just clearInterval and with play I want to start where changePhoto has been stopped???
Code: nav_mc.pause_mc.onRelease = function() { trace("Pause this "+pIndex);[code].....
I have a slideshow I've built that uses setInterval to pause at each image. At each paused keyframe, a short animation plays (the animation is contained within an object which only exists at the single keyframe). The problem I used to have was that after the first time around (all images shown), the slideshow begins increasing in speed (not pausing for the full duration), and eventually begins sparadically skipping pauses all-together. I rearranged the code, and fixed the speed-up/skipping problem, but now my advance and goBack buttons don't work right, and they cause skipping.
I'm trying to play through a MovieClip frame by frame using setInterval. Overall I'm trying to imitate speeding up and slowing down of the MovieClip by changing the setInterval time. Basically, when a user moves the Slider the MovieClip needs to speed up or slow down based on the Slider value. EDIT: The code above works to a certain extent. As in the slider updates updateClip() and the MovieClip does actually play at one speed. But the MovieClip does not play at the speed variable value. If I remove the ClearInterval() the MovieClip just plays at one speed but then doubles when the Slider is changed. What I'm looking for is the MovieClip to play at the same rate as speed value.
I'm making an interactive film. At certain points within the film, the viewer has the ability to select from a few options that will direct them to an external video clip (they are flashback scenes). The main story pauses when the user selects a flashback scene and I'm clear on how to achieve this.
However, my issue is that once the flashback scene ends and the external video closes, I'm not sure how the main story will resume. Is it possible for it to auto-play (resume) in some way? My last resort would be to have the viewer select a play button - this is only because I do not want a break in the narrative and want to limit the amount of clicks the viewer has to make.
I have a file that uses buttons to play a series of videos. I want to have the button for the currently playing video to stay in the 'down' state while it plays but I don't know how to do it.
I have a few flvs made from After Effects that are now movieclip symbols that I have to use as buttons. My problem is that I want those movieclips to continuously play even without doing a mouse rollover. Then, when it's rollover, rollout, or click time, another animation will play within the movieclips that I'm going to use as a button.
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();
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.
Can someone help me finding a tutorial or explain to me how I can make a image gallery where I can click next / prew button AND have a play / pause button? I have accomplished to make both but not in the same flash file. I believe I have search the whole internet and tried everything (but off course that's not really possible). I have learned to make at least 6 different types of image gallerys now, but none of them works with both next/prew AND play/pause.
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);
I want to make on button play a piece of music and another one to stop the music. I manage to make buttons work for playing frames in the timeline, but how do I make the buttons play the music and stop it?
I have 10 buttons on my homepage and I want to play the same movieclip when you click on a button and after that move to a specific frame for each different button.
Someone know an easy to make this without having to create 10 differents movieclips just to change the action at the end of the movieclip?
My buttons are not working and I dont get it why. They should control an actionscript contolled FLV. There is an invisible button, which controls the pop up flv contorler bar. This bar mc contains the FLV video player controller buttons (play,rewind). Somehow this buttons are not working inside the bar.
Here is the code: nc.connect (null); var ns: NetStream = new NetStream(nc); myVideo.attachVideo(ns); ns.play("No More Oil Platforms.flv"); this.ControllerAnime_mc.Bar_mc.Play_mc.onPress = function() { [Code] .....
I am trying to make buttons that play a movie then go to the page.
I want you to be able to click on the button (bottle) and then the motion tween play out and then when its finished direct you to the desired page.
I posted the code above that I used to get the button to play out on click, but I cannot get the code right to get it to redirect to a different page or url right after the movie plays?
I have a couple of movies to add controls to and the consist of a series of layers with classic tweened movie clips. There is a button layer set up along with all the buttons, and an AS3 layer set up. This is the initial code I set up on the AS3 layer first frame:
innercircle is a movie clip which runs throughout the entire movie, so that's why I picked it to use in the command above. When tested this should enable the play button to work, however it's not working and brings up this error: 1061: Call to a possibly undefined method AddEventListener through a reference with static type flash.display:SimpleButton.