[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Controlling playback of movieclips from the main timeline

Posted on 2007-08-03
Medium Priority
Last Modified: 2013-11-05
Hi. I have created a movie in Flash 8. On the main timeline one layer consists of three movie clips positioned sequentially (i.e. the first movie clip mcIntro is in frame one, mcMiddle is in frame two, and mcEnd is in frame 3). I would like a button on the main timeline that would, when clicked, pause whichever movie clip is playing, and then change into a play button so the same movie is restarted from the position where it was initially paused. I'm stuck right from the start because I don't know how to specify that the button is to control whichever movie clip happens to be playing. Thanks a lot for the help!
Question by:choward123
  • 2
  • 2
LVL 14

Expert Comment

ID: 19629760
In order to control the movieclips, you have to give the movieclips instance names (you can do this in the properties panel). Give each of them separate instance names so that you can refer each on in actionscript individually. Once you have the instance names, you can control the movieclips accordingly using the _root.myclip1.stop() to stop them and _root.myclip1.play() to play again. Replace myclip1 with the instance names of the movieclips so if you have mcIntro as the instance name for one of the movieclips, you can stop and play it using this command:


Author Comment

ID: 19630012
Thanks trigger-happy, but that's not exactly what I'm looking for. I have navigation buttons where the viewer can jump to certain sections and I've coded those buttons to how you have described, but I am still stuck on the pause buttons.

The way the movie is set up is so the viewer will watch all three movie clips in a row without a break, like a presentation. I want to add the pause button so the viewer has the option to stop the presentation midway, so I'm wondering if there is a general way of saying to stop whatever movie clip is playing and then be able to restart the same movie clip in the same frame.

LVL 14

Accepted Solution

trigger-happy earned 825 total points
ID: 19630029
The only method that I'm aware of for stopping all movieclips would be to make use of the actionscript events. That kind of method is actually way more complicated than simply forcing specific movieclips to stop/pause. In general, if you intend to make a lot more video segments, then using the Flash event system would be a very good choice, but with just 3-4 video segments, you're better off commanding the movieclips individually. This can be done by creating keyframes for all 3 segments in the main timeline for the play/pause button. In each frame, change the code inside the button to refer to the appropriate movieclip instance.

Hope I understood your problem and helped solve it.


Author Comment

ID: 19631076
Thanks, I think I'll stick with the less complicated route now. I appreciate your help.

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to how to record live broadcast.
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question