Solved

Flash script - layered pause/play button

Posted on 2009-03-30
7
2,490 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
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 what frame rate is, how to control it and what effect it has on the video.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

743 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

15 Experts available now in Live!

Get 1:1 Help Now