ActionScript 2.0 :: Single Stop/resume Button For SWF File?
Sep 16, 2010
I'm looking for an AS2 tutorial or template that will show me how to create ONE button that will stop and resume an SWF file that is made up of several composited movieclip elements. I've found several that use two buttons (start and stop), but I would like one that operates like the single sound on/off buttons you see on many sites.
I currently have a 23-frame multilayered single-scene animation designed to loop continuously which I would like to add to my portfolio. As such, I am adding a Play button, which I would like to toggle to a Stop (or Pause) button. I currently have an instance of the Play button ("playButton") created.
(You can find this at pineboxmovingco.com/gear_redux.swf)
Besides imploring your assistance in providing the code, I must also ask if this requires (and best practice for) inserting an additional frame at the beginning for the ActionScript, as well as where/what layer to add an instance of the Stop button. I would like the movie to be stopped by default, presenting the Play button, toggling to the Stop button, and back to the Play button, each upon release.
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();
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,
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 created a flash movie for a presentation that has six buttons.Each button has a action script with a root target keyframe,i.e. button three [code]When the timeline reaches the target keyframe the movie stops and movie clip animations for that keyframe play.I have actionsript in the main timeline that allows me to play the main time line in reverse [code] The pause should pause the movie clips if I'm pausing in the target keyframes.
I want to do an upload script that can take rather big files 500MB, 1GB and upload it with resume functionality. Is this possible with just PHP or is there other solution like Java Applet, Flash and which one would be best for this case?
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 like what the script below does but I need it to be extended in 2 ways and I can not figure how.this is what I would like this code to do...
1. play (ideally stream) sound automatically on entering the site.(right now the play button must be invoked, and it takes a little time to load.)
2. loop that same sound source
3. instead of stopping the sound I would prefer a pause.so more simply sound plays on entering site and I have ONE button (well 2 but changing visibilities) that control only pause and resume I have looked around quite a bit but can never find what I am looking for it would appear that everyones sound issues are so unique that no one has the exact issue that I do (well I am sure many do but I can't find the thread. ) and here is a link to what I have as of now
Code: var loadSnd:URLRequest = new URLRequest("ax Mr .l..mp3"); var thisSnd:Sound = new Sound(); thisSnd.load(loadSnd);
the method for stopping/playing sound in 2.0 don't work for 3.0. i can stop the sound by going to a different page/frame on the site.but i want the buttons.
I have to build one MXP package for Flash (not Flex). But i have multiple components, somthing like HelpSymbolMovieClips(have its on class), one image holder. etc. I need to combine there swc file into a single MXP file.How can i make a all these multi movieClip functionality in a single SWC file. Am bit confused about the structure of the component which is having multiple functions/MoiveClips. like (Image gallery components.
this is my current cv, painstakenly written in flash: [URL] I was told that I can use an external data file and load this into a flash file with xml, i am trying to make an xml file that will do what you see here above. But i cannot get the information to load properly where each title is separate (bold) and the description underneath it (plain text). i cannot get my cv to show up in a linear format as it only shows the first entry and then stops.
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?
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.
How do I stop a class file from automatically inserting itself into the .fla file. I want to insert it manually into a frame, and then tell it to stop after I leave the frame.The following is the code included in my .as file.
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]
how to stop a single movie clip in flash and other movie clips still looping. I tried stop(); and myclipname.stop(); both are not working. I attached a simple file,
I'm trying to get my hands on an open source mp3 player with a volume control and progression bar but all the ones I've found are for use on webpages.. What I want, however, is to insert such an mp3 player into a projector file that I've created.I've got 10 keyframes, each with a different slide. I want an mp3 player on each slide, but it will play a different track.Does anyone know of a customizable mp3 player like that?
I have several mp3 files that I use in my Flash animation but I want to publish this animation as a single SWF file. Don't want the mp3 to be also made available along with the SWF.
I'm extremely new to Flash and I am making a website and want to have a single button that when pressed pauses or plays a music file. I was able to create one that works by following a tutorial that I found online but the problem is that the button is on the main timeline so as I move away from it, it stops working. I think that it would work better if I was able to make a movie clip out of the button so that it doesn't sit on the main timeline and will keep working no matter where I am on the timeline. All I need is one button that pauses and plays music when pressed. I also want to be able to have a "music on" line of text and "music off" line of text depending on whether the music is playing or not.
I'm trying to create a button that, when first clicked, will add a MC to the stage. Then, on the second and subsequent clicks will remove the existing MC and replace it with a new one. The code I'm using is: