Connecting Tech Pros Worldwide Help | Site Map

how to play and pause movie clip in flash

Familiar Sight
 
Join Date: Nov 2007
Posts: 233
#1: May 3 '08
Hi

I want to play/pause a movie clip when I click a button and the value of button should changed to play when it is paused and pause when it is playing.

I am new to flash so how can I do it.
kestrel's Avatar
Moderator
 
Join Date: Jul 2006
Location: California!!!
Posts: 898
#2: May 6 '08

re: how to play and pause movie clip in flash


Look through the tutorials listed on the sticky on the Flash Forum. You can find all that you need there.

--
Kestrel
Newbie
 
Join Date: Aug 2006
Posts: 30
#3: May 11 '08

re: how to play and pause movie clip in flash


Quote:

Originally Posted by mukeshrasm

Hi

I want to play/pause a movie clip when I click a button and the value of button should changed to play when it is paused and pause when it is playing.

I am new to flash so how can I do it.


you need to create a common movie clip for play pause control, and flag there with play and pause on different frames for each state.
now, change position on click event.

- Jitendra
[removed link]
Newbie
 
Join Date: Jun 2008
Posts: 4
#4: Jun 6 '08

re: how to play and pause movie clip in flash


Your response states, "Look through the tutorials listed on the sticky on the Flash Forum. You can find all that you need there."

What is a 'sticky?' I am new to this forum and have not been able to find any area called 'sticky.'
joedeene's Avatar
Site Addict
 
Join Date: Jul 2008
Location: US of A
Posts: 587
#5: Nov 1 '08

re: how to play and pause movie clip in flash


Quote:

Originally Posted by kelleyg

What is a 'sticky?' I am new to this forum and have not been able to find any area called 'sticky.'

If you still don't know what a sticky is or are still working on this project let me know, and a sticky is just threads that have been posted by Moderators or Administrators that are called sticky because they are always the top on the list and never get moved down(rather than normal questions that have been posted to be answered). I believe the 'sticky' he was talking about was this one. Stickies are not just a section or their own forum, each forum has different ones, depending on what has been posted by the Admins or Mods to remain sticky. There is also a yellow strip that says sticky under the threads...

joedeene
Newbie
 
Join Date: Oct 2008
Location: Earth
Posts: 29
#6: Nov 2 '08

re: how to play and pause movie clip in flash


Make a move clip with two frames, on the first one put a play symbol and on the second one a stop symbol. On both of the frames place the code.

Expand|Select|Wrap|Line Numbers
  1. stop();
Then go back to the main time line and give your movie clip an instance name in the properties box at the bottom. For example you could call it StopNGo_mc. After you have done this, then add the following code to your main timeline.

Expand|Select|Wrap|Line Numbers
  1. _root.StopNGo_mc.onRelease = function() {
  2.     if (_root.StopNGo._currentFrame == 1) {
  3.         _root.StopNGo.gotoAndStop(2);
  4.         _root.Movie_mc.stop();
  5.     } else {
  6.         _root.StopNGo.gotoAndStop(1);
  7.         _root.Movie_mc.play();
  8.     }
  9. };
In the code above, Movie_mc is the instance name of the movieclip you want to control. If you have any questions, just ask.
Reply


Similar Flash / Actionscript bytes