MX2004-Text Area component HTML tag freaking dynamically created string out.
Hi,
I am using a text area component in MX2004 to print out a line of text one letter at a time.
I had the whole thing working great, but wanted to put some HTML formatting into it, so added the line of code to enable HTML in the field into which I was typing. Now when I I test the movie each letter appears on a separate line so you will get something like:
S
h
e
s
e
l
l
s
Can anyone offer me any help on this.
Code set out below.
Fla attached.
code:
holdEm_str = "She sells sea shells on the sea shore";
_root.past_txt.html = true;
counter = holdEm_str.length;
down = 0;
function addLetter() {
if (down<counter) {
_root.past_txt.text += holdEm_str.slice(down, down+1);
down++;
past.focusTextField.scroll = past_txt.focusTextField.bottomScroll;
} else {
clearInterval(letterTime);
}
}
var letterTime = setInterval(addLetter, 45);
Last edited by pup100; 03-26-2009 at 05:34 AM.
You will know everything when you know you never will.
I'm not too sure what is happening there, but would imagine that rather than adding each individual letter you are now adding the entire string + the new letter.
Hopefully that should be it for the dynamic text part of the project I am working on so I shouldn't have to pull on your apron strings again this week, but again thank you for you help with the two problems I have had.
You will know everything when you know you never will.