Solved

Flash script - layered pause/play button

Posted on 2009-03-30
7
2,497 Views
Last Modified: 2013-11-11
I have a pause and play button.   It goes without saying that I need the pause to pause and the play to play.  I have that working now with the code included, but my problem is....  I'd like for the buttons to be layered and swap between pause/play.
//script on the instance btn_play
on (press) { 
play(); 
} 
 
//script on the instance btn_pause
on (press) { 
pause(); 
}

Open in new window

0
Comment
Question by:sl1nger
  • 4
  • 3
7 Comments
 
LVL 19

Expert Comment

by:quizengine
ID: 24021265
see the attached movie. Msg me if it doesn't make sense.
playpause-cs3.fla.jpg
0
 

Author Comment

by:sl1nger
ID: 24021840
Do you know of a step by step tutorial for seomthing like  this?
0
 
LVL 19

Expert Comment

by:quizengine
ID: 24022973
I don't (know of a tutorial) but if my sample works for you, are you not able to look at the structure of this and learn from it ?

I'm happy to answer any questions on it, and I think because I have specifically built something that matches your needs, you have a much better chance of learning by pulling this to bits.

Do you agree ? Do you have questions you want to ask ?

0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:sl1nger
ID: 24025361
Yes.  Your example was good.  I'm trying to use this in conjunction with a pause and play button from the common library.
0
 

Author Comment

by:sl1nger
ID: 24025406
Also, my movie starts and shows the pause button first because in my movie -- I'm making the ball roll from the start.  
0
 
LVL 19

Accepted Solution

by:
quizengine earned 500 total points
ID: 24027622
See new file with new behaviours. Check the stage for instructions on how to drop your buttons into the movie.
playpause-reversed-cs3.fla.jpg
0
 

Author Comment

by:sl1nger
ID: 24043524
Thanks.  That makes sense now.  I found that it was breaking because I 'm using this every 24 frames --- stop();
var interval:Number = setInterval(
  function():Void {
    play();
    clearInterval(interval);
  },
  2000
);

Anyway, I can keep that.  Otherwise, I'll have to extend the frames to make pause longer.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Rotating Adobe pdf document 4 321
Flash Slides/Presnetation 4 77
Flash content not working in IE 11 on Windows 8.1 3 174
Play RTMP without Flash 3 640
I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

856 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