A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Editing Dynamic Text with HTML (MX)

  1. #1
    I Love $$$ rjlstar's Avatar
    Join Date
    Jul 2002
    Location
    USA
    Posts
    432

    Editing Dynamic Text with HTML (MX)

    Code:
    myVari="Top line<BR><BR>Bottom line";
    works fine for me.

    But
    Code:
    myVari="<FONT SIZE=4>Top line<BR><BR>Bottom line</FONT>";
    does not work for me.

    What is the correct way to use the the font size tag?

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    http://www.macromedia.com/support/fl...s/htmltext.htm

    Use a <FONT> tag to change the font face and size. In the Value field of the Set Variable action, replace the existing HTML string with the following:
    code:

    my_text = "<FONT FACE='Arial' SIZE='24' COLOR='#00FF33'><B>This is bold 24 point text</B></FONT>";



    But 4? Are you sure about that size?
    Last edited by oldnewbie; 07-21-2004 at 03:25 AM.

  3. #3
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    Flash requires that tag-properties data are enclosed in ' ' or " ".

    Code:
    myVari="<FONT SIZE='4'>Top line<BR><BR>Bottom line</FONT>";
    Also the size propery's unit is in points so size='4' will give a realy small text.

    /Mirandir

  4. #4
    I Love $$$ rjlstar's Avatar
    Join Date
    Jul 2002
    Location
    USA
    Posts
    432
    I copied this straight out of the Macromedia link old newbie posted, and this is what was outputed when I tested the movie:

    Code:
    Scene=intro, Layer=AS, Frame=1: Line 6: ';' expected
         main.main = "<FONT FACE="Arial" SIZE="24" COLOR="#00FF33"><B>This is bold 24 point text</B></FONT>";

  5. #5
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    try changing the " " enclosing the string to ' '.

    As the tag-properties are enclosed in " " flash now thinks that the string ends with the beginning of the first property's data.


    /Mirandir

  6. #6
    I Love $$$ rjlstar's Avatar
    Join Date
    Jul 2002
    Location
    USA
    Posts
    432
    Problem Solved. Thanks.

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