im new to actionscript3 flash. I have a int variable and i would like to add +2 every second since game started. How can i do this ? how do i know how much time has elapsed? thanks in advance!
相关问题
- garbage collection best practices
- Should I wait for Flash Player 10.1 or go with Fla
- How to load flex swf from flash?
- Timer vs. repetitive background worker
- FlashDevelop Haxe (Flash) debugger
相关文章
- Is the HPET directly accessible in Windows?
- Are there any benefits when using final in AS3?
- Trace on Chrome/Browser console
- Blinking Button for Simon Says
- as3 ByteArray to Hex (binary hex representation)
- getElementById not working in Google Chrome extens
- Timer Label not updated after switching views (swi
- Indy TIdTCPClient receive text
getTimer() will return an int of exactly how many milliseconds from when flash started.
myInt will now be however many seconds the program has been running.
edit: oh to tell how long it has been running just keep the initial myInt and check it against the current timer.
so when the game first starts.
then every frame or whenever you need to check it.