-
1. Re: AUTOTYPING speed problem
kglad Mar 21, 2010 10:19 AM (in response to Dubbel D)if you're using a listener to "type" your text, remove that listener before re-adding it.
if you're using setInterval() to "type" your text, clear that interval before re-creating it.
if you don't understand what you're doing, post your code that "types" your text.
-
2. Re: AUTOTYPING speed problem
Dubbel D Mar 21, 2010 10:36 AM (in response to kglad)I am using a "setInterval" code, but I do not understand what you mean by clearing it every time.
This is the code that I am using:
"var i:Number = 0;
var myMessage:String = "...What are we going to do now";
function autoWrite():Void {
if (i<=myMessage.length) {
monitor_txt2.text = myMessage.substr(0, i)+"?";
i = i+1;
} else {
clearInterval(writingInterval);
}
}
var writingInterval:Number = setInterval(autoWrite, 80);"What is it that I have to do?
-
3. Re: AUTOTYPING speed problem
kglad Mar 21, 2010 12:59 PM (in response to Dubbel D)use:
var i:Number = 0;
var myMessage:String = "...What are we going to do now";
function autoWrite():Void {
if (i<=myMessage.length) {
monitor_txt2.text = myMessage.substr(0, i)+"?";
i = i+1;
} else {
clearInterval(writingInterval);
}
}clearInterval(writingInterval);
var writingInterval:Number = setInterval(autoWrite, 80);
-
4. Re: AUTOTYPING speed problem
Dubbel D Mar 21, 2010 1:10 PM (in response to kglad)Nothing changed. It's the same with the previous code; the first play looks good but as soon the Flash restarts the typing increases speed.
-
5. Re: AUTOTYPING speed problem
Dubbel D Mar 21, 2010 1:27 PM (in response to kglad)Oh geez, never mind my brainless blatter.
It works just fine, I forgot to add it to the rest of the codes.