                 // Check for correctly placed hyphens
                 if (i == 8 || i == 13 || i == 18 || i == 23)
                 {
-                    if (c != 45)
+                    if (c != DASH)
                     {
                         return false;
                     }

     *  @private
     *  Char codes for 0123456789ABCDEF
     */
    private static const ALPHA_CHAR_CODES:Array = [48, 49, 50, 51, 52, 53, 54, 
        55, 56, 57, 65, 66, 67, 68, 69, 70];

    //--------------------------------------------------------------------------
    //

     */
    public static function createUID():String
    {
        UIDBuffer.position = 0;

        var i:int;
        var j:int;

        for (i = 0; i < 8; i++)
        {
            UIDBuffer.writeByte(ALPHA_CHAR_CODES[int(Math.random() * 16)]);
        }

        for (i = 0; i < 3; i++)
        {
            UIDBuffer.writeByte(DASH);
            for (j = 0; j < 4; j++)
            {
                UIDBuffer.writeByte(ALPHA_CHAR_CODES[int(Math.random() * 16)]);
            }
        }

        UIDBuffer.writeByte(DASH);

        var time:uint = new Date().getTime(); // extract last 8 digits
        var timeString:String = time.toString(16).toUpperCase();
        // 0xFFFFFFFF milliseconds ~= 3 days, so timeString may have between 1 and 8 digits, hence we need to pad with 0s to 8 digits
        for (i = 8; i > timeString.length; i--)
            UIDBuffer.writeByte(48);
        UIDBuffer.writeUTFBytes(timeString);

        for (i = 0; i < 4; i++)
        {
            UIDBuffer.writeByte(ALPHA_CHAR_CODES[int(Math.random() * 16)]);
        }

        return UIDBuffer.toString();
    }

    /**
