Hacker News new | ask | show | jobs
by scommab 5591 days ago
Well to get technical there isn't a "sleep" function in flash. The best you can do is use setTimeout, which will call a function back in a specified amount of time. Everything including screen drawing, mouse interaction, effects/animations, code execution, etc all run in a single thread, which means if you could actually sleep(1) it would lock everything up for the full second.