Animation of the typing effect of pure as in flash
Source: Internet
Author: User
/*
Www.3c800.com
*/
This.createtextfield ("Textcontent", 1, 200, 10, 300, 500);
Textcontent.multiline = true;
Textcontent.wordwrap = true;
Textcontent.html = true;
//-----------------------------------------------
function TypeText (str:string, Speed:number) {
STR: text content speed: typing speed
var i = 0;
var ttext = new Object ();
var Is_type_txt:boolean = true;
Ttext.interval = function () {
var type_txt_move = new String (str);
Textcontent.htmltext = type_txt_move.substring (0, i+1);
if (is_type_txt) {
i++;
} else {
i = 0;//cycle typing
Clearinterval (ttext_id);
}
if (i>=type_txt_move.length) {
Is_type_txt = false;
else if (i<=0) {
Is_type_txt = true;
}
};
var ttext_id = setinterval (Ttext, "interval", speed);
}
//-----------------------------------------
TypeText ("<b> to Lewing" </b><br/> Tian Zijun <br/> spring you come to me <br/> full face smiles like the brilliant winter Jasmine open <br/> You use the style of the messenger <br/> let me and spring hold a full of <br/><br/> summer you come to me <br/> rain mixed with sweat <br/> follow your forehead and gently slide the <br/> At the moment you turn <br/> from your eyes I read persistence <br/><br/> fall you come to me <br/> the falling leaves on the ground like your hurried gait <br/> no regrets choice <br/ > is your sincere love of life <br/><br/> winter you come to me <br/> the swimming flowers for your affectionate dance, your resolute face in <br/> curtains <br/> is the eternal sculpture in my heart ... ", 100);
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.