Solved

Seek as2 code to display elapsed time

Posted on 2006-06-11
3
283 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
[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
  • 2
3 Comments
 
LVL 7

Expert Comment

by:Ramy_atef
ID: 16880469
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
ID: 16880583
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
ID: 16880667
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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to how to record live broadcast.

756 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