Posted By

chrisaiv on 01/14/08


Tagged

as3


Versions (?)


Advertising

Website Promotion DIRECTORY is a crucial factor for all websites that need to gain better organic search engine rankings and increase website traffic.
Submitting your website as part of your Web Promotion strategy to our SEO friendly and high traffic Business Directory for review is an excellent way to gain a valuable backlink and increase your websites visibility online.

Submit Site


Who likes this?

9 people have marked this snippet as a favorite

arala22
outbox
meltmetal
THEPWN3R
enajenkins
Winkyboy
mprabhuram
edsonpavoni
SmpleJohn


AS3: Basic Timer example


Published in: ActionScript 3 






Flash's Timer Class requires two parameters. The first is the delay (in milliseconds), the second is the amount of times you want the delay to fire.

Expand | Embed | Plain Text
  1. var timer:Timer = new Timer(1000, 2);
  2. timer.addEventListener(TimerEvent.TIMER, blah);
  3. timer.start();
  4.  
  5. function blah(e:TimerEvent):void{
  6. trace("Times Fired: " + e.currentTarget.currentCount);
  7. trace("Time Delayed: " + e.currentTarget.delay);
  8. }

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: bengoevaerts on February 18, 2010

When e.currentTarget.currentCount = 1 i would like to reset it again to 0. How can i do this? I tried e.currentTarget.currentCount.reset(); and some kind like that ... but it won't work, any ideas?

Posted By: chrisaiv on February 23, 2010

What are you trying to accomplish? Maybe there's another way to solve your problem?

You need to login to post a comment.