Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Flash script - layered pause/play button

Posted on 2009-03-30
7
Medium Priority
?
2,511 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 2000 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
Suggested Courses

688 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