Solved

use of pause button

Posted on 2001-06-05
6
165 Views
Last Modified: 2010-04-03
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.
0
Comment
Question by:taimur
6 Comments
 
LVL 6

Expert Comment

by:Jaymol
ID: 6162725
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
 

Accepted Solution

by:
rohitgautam earned 50 total points
ID: 6173243
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
 
LVL 1

Expert Comment

by:Moondancer
ID: 6939378
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:taimur
ID: 6939616
I already have figured it out myself, but your answer will also help in future. Thanks
0
 

Expert Comment

by:rohitgautam
ID: 6939790
Use the same pause buttoon

on press write _root.stop();

on releae write _root.play();

Thats it !
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6940498
Thank you for returning and finalizing this question.
:) Moondancer - EE Moderator
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now