Results 1 to 4 of 4

Thread: How to Render xml text as html in Flash

  1. #1
    Join Date
    Dec 2008
    Posts
    69

    How to Render xml text as html in Flash

    I'm struggling with an xml problem. Within my Flash movie (CS3), I have two dynamic text boxes (one titled 'title' and the other titled 'description'). I have data displaying in a dynamic text box imported through xml. Is there any way to set a line height of the imported text? But when I place the dynamic text box inside a movieclip, I can't get the text too load into the dynamic text box which is inside a movieclip. Maybe I am confusing myself here but hopefully someone can assist me with this?

  2. #2
    Join Date
    Jan 2009
    Posts
    163

    Re: How to Render xml text as html in Flash

    Suppose data.txt is the file from which you have to load a variable (And It is placed in your swf file directory) .And mc is the movie clip in which your dynamic text is placed. strange enough, but enabling htmltext in the property inspector fails, while enabling htmltext via actionscript works.

  3. #3
    Join Date
    Feb 2009
    Posts
    105

    Re: How to Render xml text as html in Flash

    If you want to keep the formatting intact after text is added.. you need to use setNewTextFormat.So if you are using a font (lets say Arial) that doesn't exist in the device, the player won't render it, and automatically change it to display a device font. And if your text field is rotated, the phone won't even display the device font, as FL does not support device fonts on rotated text. The following code, with render text as html UNCHECKED also prevents my text from displaying, as does not having the code and checking render text as html:

    menu_field.html = true;
    menu_field.htmlText = this.menu_text;

  4. #4
    Join Date
    Dec 2008
    Posts
    120

    Re: How to Render xml text as html in Flash

    Embedding will increase file size..I seem having the same problem as you, regarding the CDATA section, and also 'Render as HTML',Did you manage to fix it? IF so, i would be grateful if you could let me know how you overcame this issue.but the solution is to use light weight pixel fonts rather than the fancier ones which not only take up more memory while rendering, but also increase file size and don't guarantee complete legibility when seen on device in smaller sizes.

Similar Threads

  1. How to render html into the webview for HP WebOS
    By Omanand in forum Portable Devices
    Replies: 2
    Last Post: 20-08-2011, 01:55 AM
  2. Insert HTML text box
    By - Empty Shell - in forum Software Development
    Replies: 10
    Last Post: 23-12-2010, 04:22 AM
  3. Render HTML in FLEX
    By Nereus in forum Software Development
    Replies: 6
    Last Post: 13-07-2010, 06:11 AM
  4. How to set html text background
    By Broot in forum Software Development
    Replies: 3
    Last Post: 29-07-2009, 03:16 PM
  5. How to put html tag to color text
    By garfield1 in forum Software Development
    Replies: 3
    Last Post: 28-07-2009, 11:38 AM

Tags for this Thread

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
  •  
Page generated in 1,711,632,363.02586 seconds with 17 queries