String.prototype.isAnagram = function(string:String):Boolean {
return (this.toLowerCase().split('').sort().join('') == string.toLowerCase().split('').sort().join('')) ? true : false;
};
Use as follows:
string_1 = "dear";
string_2 = "read";
string_3 = "reed";
trace(string_1.isAnagram(string_2)); // true
trace(string_1.isAnagram(string_3)); // false