Generate unique numbers in ActionScript
In php there's a function called uniqid. It gener开发者_高级运维ates unique identifiers based on the current time. I was wondering if something like that was available in ActionScript.
There is no built-in way to generate a true UUID in ActionScript. You can get something good enough via
import mx.utils.UIDUtil;
var uuid:String = UIDUtil.createUID();
There are a couple of snippets and libs I've found to do this is pure ActionScript
- http://code.google.com/p/actionscript-uuid
- http://snipplr.com/view/45247/
精彩评论