Prototype giving error in action script 2.0

Hi,
following prototype is running fine for action action script 1.0 but its giving error in action script 2.0…
Could anybody please tell me why I m having error…

Prototype is here:

var str1 = new Array();

[COLOR=navy][COLOR=magenta]
[COLOR=navy][COLOR=magenta]String.prototype.lettres = function() {
cOK = “ABCDEFGHIJKLMNOPQRSTUVWXYZ”;
if (cOK.indexOf(this.substr(0, 1).toUpperCase()) != -1) {
str1[str1.length] = (this.substr(0, 1));
}
if (this.length>1) {
this.slice(1).lettres();
}
};[/COLOR]
[/COLOR]
(“a213213t3213u321313133l”).lettres();
trace(str1);
[/COLOR][/COLOR]

[/quote]thanks in advance…