开发者

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/
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜