Convert ActionScript code from Flash 5 to Flash 8

Greetings,

I have a Flash5 Actionscript here that does not work on Flash8, I´ve tryed to fix but had no sucess…

Can anyone help me with that ??


largodemo = 25;
myString = this._name;
temp1 = "";
for (n=0; n<largodemo; n++) {
    temp1 += chr(random(42)+48);

}
temp2 = this.myString.substr(0, i);
this.eltexto = temp2+temp1.substring(i, largodemo);
i++;
if (i<=largodemo) {
    gotoAndPlay(1);
} else {
    stop();
}