Dynamic in the scene to create an instance named Textcontent dynamic text box, the HTML hit ~ ~
Create a new layer and copy the following code to the past
Created by Guoyl (Summer Night) yady.net
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 as bright winter jasmine open <br/> You use the style of the messenger <br/> Let me and spring embrace a full <br/><br/> Summer You come to me <br/> Rain mixed sweat <br the beginning of your forehead gently slipped/> <br In the moment you turn around <br/> from your eyes I read the persistent <br/><br/> Autumn You come to me <br/> Ground flying leaves like your hurried gait <br/> No regrets <br > is your sincere love of life <br/><br/> Winter you come to me <br/> Swimming flowers for your affectionate dance <br/> Curtain in your resolute face <br/> is the eternal sculpture in my heart ... ", 150);
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.