A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: MX2004-Text Area component HTML tag freaking dynamically created string out.

Threaded View

  1. #1
    Senior Member pup100's Avatar
    Join Date
    Oct 2004
    Location
    Close
    Posts
    575

    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);

    Attached Files Attached Files
    Last edited by pup100; 03-26-2009 at 05:34 AM.
    You will know everything when you know you never will.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center