use of pause button

I have a flash fla file in which there are animations and pictures that are synchronized with background voice. I need to put a pause button so that if a user presses it my flash movie stops and when he presses it again movie and audio should start right from where it was paused/stopped.
Taimur HassanDirectorAsked:
Who is Participating?
 
rohitgautamConnect With a Mentor Commented:
u can use stream sound ! m place a pause button there !

u can even change the pause button when user clicks on the pause button the play button should be there to resume ! u can have both the buttons on the same place it would look that the button image is changed
 


just choose same pause n play buttons i.e. of same height n same area ! place them at the same place.

Assume that u make a movie instance n ur whole movie is there n u place the movie onthe main time line lets assume that u have given the movie instance on the main time line is "mn".

Assume that u have place the buttons on the different movie clips n given the instance name to movie clips of puase button to "ps" n to play button as "ps".

 
go in the movie clips of buttons
u first have to place the


the actions on the pause button would be

on (release) {
     
     setProperty (this, _visible, 0);
     setProperty (_root.mn.pl, _visible, 1);
     _root.mn.stop();
}

the actions on the play button would be


on (release) {
     setProperty (this, _visible, 0);
     setProperty (_root.mn.ps, _visible, 1);
     _root.mn.play ();
}


first write down these actions on the instance movie clip of play button

onClipEvent (load) {
setProperty(this,_visible,0);
}



Place the play button on the pause button

u will see that when user clicks on the pause button then the play button will come out to tell user to that u can play now as u see in windows media player

if u cant unserstand then plz mail me at rohit_urs@rediffmail.com i will send u the .fla file

Thanx

Rohit
0
 
JaymolCommented:
You need to have the sound streamed.  This will make it playable, frame by frame.  If you have the sound event "Start", you can only play it from the beginning.

To put a pause button on there, simply create a movie clip with a button on frame 1 that says "Pause" and a button on frame 2 that says "Play".

The "Pause" button should have the actions....

        _root.stop();
        nextFrame ();

....and the "Play" button should have the actions....

        _root.play();
        prevFrame ();

That should do the trick.

John.
0
 
MoondancerCommented:
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and keep them updated as the collaboration effort continues, to maintain your open and locked questions.  If you are a  KnowledgePro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer which does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item for help.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20076823.html
http://www.experts-exchange.com/questions/Q.20100812.html
http://www.experts-exchange.com/questions/Q.20120163.html
http://www.experts-exchange.com/questions/Q.20130478.html
http://www.experts-exchange.com/questions/Q.20282469.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20120288.html
http://www.experts-exchange.com/questions/Q.20130475.html

**** PLEASE DO NOT AWARD THE POINTS TO ME. *****
 
------------>  EXPERTS:  Please leave your closing recommendations if this item remains inactive another seven (7) days.  If you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643 
POINTS FOR EXPERTS awaiting comments are listed here -> http://www.experts-exchange.com/commspt/Q.20277028.html
 

Moderators will finalize this question if in @7 days you have not responded.  They will either move this to the PAQ (Previously Asked Questions) at zero points, delete it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Taimur HassanDirectorAuthor Commented:
I already have figured it out myself, but your answer will also help in future. Thanks
0
 
rohitgautamCommented:
Use the same pause buttoon

on press write _root.stop();

on releae write _root.play();

Thats it !
0
 
MoondancerCommented:
Thank you for returning and finalizing this question.
:) Moondancer - EE Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.