开发者

Generate unique numbers in ActionScript

开发者 https://www.devze.com 2022-12-14 12:11 出处:网络
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 bui

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

精彩评论

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