all groups > flash actionscript > september 2005 >
You're in the

flash actionscript

group:

txt variables & linebreak problems


txt variables & linebreak problems NO[at]SPAM ndrewEmba$$y
9/9/2005 11:17:17 PM
flash actionscript:
When I load:

description=John Ohannesian
Greg Fields and Kim Graham
Mark Lafalce
Jeff Lattner
Scott Voelker
Joy Worthen

into my dynamic text field I get something like:

John Ohannesian

Greg Fields and Kim Graham

Mark Lafalce

Jeff Lattner

Scott Voelker

Joy Worthen

But it looks fine when I go

description=John Ohannesian<br>Greg Fields and Kim Graham<br>Mark
Lafalce<br>Jeff Lattner<br>Scott Voelker<br>Joy Worthen

Although I have a php script writing the txt file, and I have a user who is
going to enter text like so:

John Ohannesian
Greg Fields and Kim Graham
Mark Lafalce
Jeff Lattner
Scott Voelker
Joy Worthen[/b

So I replaced the carriage returns with <br>'s, but it kept the line breaks-
so my output text file looks like:

description=<b>John Ohannesian<br>
Greg Fields and Kim Graham<br>
Mark Lafalce<br>
Jeff Lattner<br>
Scott Voelker<br>
Joy Worthen<br>

I'm working on a php fix for this, but is there any way I could deal with a
multi-line variable on the flash end? Some setting I could use or something
that would take a file like that and disregard the linebreaks?
Re: txt variables & linebreak problems NO[at]SPAM ndrewEmba$$y
9/9/2005 11:42:23 PM
Re: txt variables & linebreak problems kglad
9/9/2005 11:42:59 PM
i usually use a split("\r\r").join("\r) on my strings loaded into flash to remedy that problem.

AddThis Social Bookmark Button