Skip to main content
December 12, 2007
Question

make a GUID?

  • December 12, 2007
  • 2 replies
  • 247 views
Is there an easy way in AS 3.0 to generate a GUID?

Thanks.
This topic has been closed for replies.

2 replies

December 12, 2007
You can also use ASCrypt3 -- it includes a GUID generator. http://ascrypt3.riaforge.org
December 12, 2007
Here's class that does just that. I use it primarily to parse existing guids generated by the OS, but you can also use it to generate a new GUID. I'm sure someone will comment if the randomness isn't up to snuff.
December 12, 2007
One of these days, I'll post code I don't have to correct :)

The switch in the toString method should be:

switch (fmt)

not

switch (format)

Not a major issue, but an issue nonetheless.