A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Link in Dynamic Text from external file

  1. #1
    [Horse Thief] gotoAndCrash's Avatar
    Join Date
    May 2007
    Location
    NW, USA
    Posts
    576

    Link in Dynamic Text from external file

    Greetings all,
    I'm having a problem. I'm using xml to pull external text files into a dynamic text field. I'm using the loadVars & "content=" method. My text field is set to htmlText.
    In the external file that gets pulled in, there is this line:
    come see my new show <a href='http://www.google.com/'> Click Here</a>

    As you can see there is a space both before the opening <a> & before the Click Here, yet neither of them are recognized. All other spaces throughout the file are preserved, but whenever there is a <a> link in the line, it disregards the spaces surrounding & within the link code, so the line rendered looks like:
    come see my new showClick Here

    Any ideas how to preserve that space?
    &nbsp; or &#160; both don't work...
    1 Infinite Loop, Cupertino is a portal of Hell.

  2. #2
    Texan at Heart
    Join Date
    Feb 2003
    Location
    Castle Rock, CO
    Posts
    15
    It should have a space (I use includes and never ran into that problem) but you might try
    Code:
    come see my new show&nbsp;<a href="http://www.google.com/">Click Here</a>
    to see if that might help

  3. #3
    [Horse Thief] gotoAndCrash's Avatar
    Join Date
    May 2007
    Location
    NW, USA
    Posts
    576
    nope, I tried both:
    Code:
    &nbsp; and &amp;#160;
    ...I discovered that it had something to do with the font size - anything below 15 would omit the space directly preceding a link tag (but not the one following it), though any size above 15 preserved the spaces. I didn't want to raise my font size above 15, so what I did is just make a new CSS class where the text was white (the background of the site is white) & put:
    Code:
    <span class='linkSpacer'>...</span>
    before the links. It's a hack, but it works!
    1 Infinite Loop, Cupertino is a portal of Hell.

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