Results 1 to 2 of 2

Thread: Flash Won't Load HTML Text

  1. #1
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Flash Won't Load HTML Text

    Hi all... I can't get my text to render as HTML no matter what I do, maybe I'm just missing something simple... Here is my code:

    Code:
    function loadTxt(theTxt){
        var lv:LoadVars = new LoadVars();
        lv.onLoad = function(success:Boolean){
            
            if (success){
                my_text.html = true;
                my_text.htmlText = lv.txt;
    			my_text.mouseWheelEnabled = true;
    			my_text.selectable = true;
    			my_text.multiline = true;
            }else{
                trace ("cannot load text!");
            }
        };
        lv.load(theTxt);
    }
    And then on frame 20 I have this:

    Code:
    loadTxt("text/file.txt")
    It loads fine but if I add any HTML say for instance <b> the text displays up until it gets to that point and then stops... I made sure that "render Text As HTML" was also checked... But no luck

  2. #2
    Join Date
    Oct 2006
    Posts
    92
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    ok you got that some what wrong

    in your flash movie place a dynamic text box the size you would need and that would be in a seperate layer called text

    in the properties of the dynamic text you would see a box called var type something like index_text

    and in the link box type the location of your text file eg
    ../text.txt

    in the text file you would type the content in as

    index_text= Bla Bla Bla

    and this would appear in the flash now you can use <p></p> and <br /> tags as far as i know but about hyperlink text I am not sure

Bookmarks

Posting Permissions

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