Solved

Seek as2 code to display elapsed time

Posted on 2006-06-11
3
249 Views
Last Modified: 2008-02-01
I need a utility to help in testing a new project...looking for a dead simple way to display time elased since beginning of the movie.
0
Comment
Question by:juststeve
  • 2
3 Comments
 
LVL 7

Expert Comment

by:Ramy_atef
Comment Utility
Hi

myTime= getTimer()/1000

it will return the elapsed since the SWF file started playing, I divided by 1000 as it returns in milliseconds

can't be more simple  than this :)

Regards,
Ramy
0
 

Author Comment

by:juststeve
Comment Utility
agreed....thx....

Now to complicate things a bit. I'm developing a slideshow where knowing the elapsed time will be required to pinpoint exactly where stuff is occuring so I can determine where the next stuff should occur. I have a 'Pause' button that will stop all the currently running tweens. How can I code this timer so it pauses too.

The tweens are coded, not timeline-based.
0
 
LVL 7

Accepted Solution

by:
Ramy_atef earned 500 total points
Comment Utility
u can't pause it ... but when u make the pause , you can save the current time in a variable and use it when u play again

for ex.

pause()
Tnow= getTimer()/1000

when u play again

play()
Tnow=getTimer()/1000 -Tnow

PS.  I'm talking theoretically, i didn't see your work..

the setInterval may also be useful for you, so consider it ..

Regards,
0

Featured Post

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.

Join & Write a Comment

In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
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 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.

762 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

9 Experts available now in Live!

Get 1:1 Help Now