Questo è il codice di typeWriter

Codice PHP:
prew._visible false//hide visible text (textWriter:)
kontrol.gotoAndStop(15); //setting the moving point for effect
//*****************************************************************************
//tweening function ***********************************************************
import mx.transitions.*;
import mx.transitions.easing.*;
function 
hare(mcpropertYneWValueolDValuespeed) {
    new 
Tween(mcpropertYStrong.easeInOutolDValueneWValuespeedtrue);
}
//end tweening function *******************************************************
//*****************************************************************************
var a:Number=1//create movie order
var firstHand:MovieClip//current effect temporary movie for effect1
var secondHand:MovieClip//current effect temporary movie for effect2
var thirdHand:MovieClip//current effect temporary movie for effect3
function effect1(spEed:NumbertextFielD:TextFieldinpuTText:String):Void {
    
delete firstHand.onEnterFrame//delete the previous effect.
    
firstHand.removeMovieClip(); //remove the old temporary movie clip.
    
var mc this.createEmptyMovieClip("aa"+aa); //create a new temporary movie clip
    
firstHand mc //adding the current temporary movie clip
    
a++; //movie order increase
    
var temporaryMc:MovieClip mc;
    var 
cOunter:Number 1//counter for animate
    
var temporaryText:String//create a temporary string object
    
var animatedText:String textFielD.text//create a string object for slicing text
    
var temporaryAnimatedText:String//create a temporary animated string object
    
var tmp:String "";
    var 
outpuTText:String ""//finally text.
    
var stringLength:Number 50;
    if (
inpuTText.length>animatedText.length) { //setting counter according to old or new text length.
        
stringLength inpuTText.length//if new text length bigger then old text length, the length set new text length
    
} else {
        
stringLength animatedText.length//if old text length bigger then new text length, the length set old text lenght
    
}
    
temporaryMc.onEnterFrame = function():Void  
        
temporaryText substring(inpuTTextcOunterspEed); //cutting current text
        
temporaryAnimatedText animatedText.slice(cOunteranimatedText.length); //setting the animated text
        
tmp += temporaryText//while animation, wrting the current text
        
cOunter += spEed//sub, speed and counter
        
textFielD.htmlText outpuTText.concat(tmptemporaryAnimatedText); //last process,  text is added to text field
        
if (cOunter>(stringLength+spEed)) { //finishing the animation.
            
delete temporaryMc.onEnterFrame;
            
temporaryMc.removeMovieClip();
        }
    };
}
function 
effect2(spEed:NumbertextFielD1:TextFieldtextFielD2:TextFieldinpuTText:String):Void {
    
delete secondHand.onEnterFrame//delete the previous effect.
    
secondHand.removeMovieClip(); //remove the old temporary movie clip.
    
var mc this.createEmptyMovieClip("aa"+aa); //create a new temporary movie clip
    
secondHand mc //adding the current temporary movie clip
    
a++; //movie order increase
    
var temporaryMc:MovieClip mc;
    var 
cOunter:Number 1//counter for animate
    
var temporaryText:String//create a temporary string object
    
var animatedText:String textFielD1.text//create a string object for slicing text
    
var temporaryAnimatedText:String//create a temporary animated string object
    
var tmp:String "";
    var 
outpuTText:String ""//finally text.
    
var stringLength:Number 50;
    
textFielD2.text animatedText;
    if (
inpuTText.length>animatedText.length) { //setting counter according to old or new text length.
        
stringLength inpuTText.length//if new text length bigger then old text length, the length set new text length
    
} else {
        
stringLength animatedText.length//if old text length bigger then new text length, the length set old text lenght
    
}
    
temporaryMc.onEnterFrame = function():Void  {
        
temporaryText substring(inpuTTextcOunterspEed);//cutting current text
        
temporaryAnimatedText animatedText.slice(cOunteranimatedText.length); //setting the animated text
        
tmp += temporaryText//while animation, wrting the current text
        
cOunter += spEed;  //sub, speed and counter
        
textFielD1.htmlText tmp;
        
textFielD2.htmlText outpuTText.concat(tmptemporaryAnimatedText); //last process,  text is added to text field
        
if (cOunter>(stringLength+spEed)) { //finishing the animation.
            
delete temporaryMc.onEnterFrame;
            
temporaryMc.removeMovieClip();
        }
    };
}
function 
effect3(spEed:NumbertextFielD1:TextFieldinpuTText:String):Void {
    
delete thirdHand.onEnterFrame//delete the previous effect.
    
thirdHand.removeMovieClip(); //remove the old temporary movie clip.
    
var mc this.createEmptyMovieClip("aa"+aa); //create a new temporary movie clip
    
thirdHand mc //adding the current temporary movie clip
    
a++; //movie order increase
    
var temporaryMc:MovieClip mc;
    var 
cOunter:Number 1//counter for animate
    
var temporaryText:String//create a temporary string object
    
var animatedText:String textFielD1.text//create a string object for slicing text
    
var temporaryAnimatedText:String//create a temporary animated string object
    
var tmp:String "";
    var 
outpuTText:String ""//finally text.
    
var stringLength:Number 50;
    
textFielD1.autoSize true;
    if (
stringLength<inpuTText.length) { //setting counter according to old or new text length.
        
if (inpuTText.length<animatedText.length) {
            
stringLength animatedText.length//if new text length bigger then old text length, the length set new text length
        
} else {
            
stringLength inpuTText.length//if old text length bigger then new text length, the length set old text lenght
        
}
    }
    
kontrol.tekst textFielD1//setting, up down moving text box
    
kontrol.play(); //animate start.
    
temporaryMc.onEnterFrame = function():Void  {
        
temporaryText substring(inpuTTextcOunterspEed); //cutting current text
        
temporaryAnimatedText animatedText.slice(cOunteranimatedText.length);  //setting the animated text
        
tmp += temporaryText//while animation, wrting the current text
        
cOunter += spEed;  //sub, speed and counter
        
textFielD1.htmlText outpuTText.concat(tmptemporaryAnimatedText);//last process,  text is added to text field
        
if (cOunter>(stringLength+spEed)) {
            
delete temporaryMc.onEnterFrame;
            
temporaryMc.removeMovieClip();
            
kontrol.gotoAndStop(15);
        }
    };