Just put literal tabs in the file.  The \t escape is only needed within
actionscript string literals.

Cheers,
barneyb

> -----Original Message-----
> From: Burns, John D [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 30, 2004 11:21 AM
> To: CF-Talk
> Subject: SOT: Load data into flash and format it
>
> I'm working on a server that only has CF 5 (and they won't upgrade to
> CFMX quite yet) and we're doing a site that requires some dynamic
> content in Flash.  Normally I'd use a web service or remoting
> to handle
> this, but from this server I cannot.  I'm trying to read in a text
> document and I can get the data in fine, however, trying to format it
> gives me a problem.  I'm trying to use the <textformat tabstops=""> to
> format the text so it appears to be in a table.  This works fine if I
> use the example that Flash gives in the help docs:
>  
> var rowHeaders = "<b>Name\t</b><b>Age\t</b><b>Department";
> var row_1 = "Tim\t31\tIMD";
> var row_2 = "Edwin\t42\tQA";
> table_txt.htmlText = "<textformat tabstops='[100, 200]'>";
> table_txt.htmlText += rowHeaders;
> table_txt.htmlText += row_1;
> table_txt.htmlText += row_2 ;
> table_txt.htmlText += "</textformat>";
>
> However, when I try just put the following in a text file, instead of
> doing tabs, the "\t" shows up as literal text:
>  <textformat tabstops="[100,200]'>
> <b>Name\t</b><b>Age\t</b><b>Department</b>
> Tim\t31\tIMD
> Edwin\t42\tQA
> </textformat>
>  
> I've even tried just putting the contents of the "table" with the
> appropriate "\t" in the text file and then do the following in flash:
>  
> table_txt.htmlText = "<textformat tabstops = '[100,200]'>";
> table_txt.htmlText += dataFromTextFile;
> table_txt.htmlText += "</textformat>";
>  
> I get the same problems every time.  I'm sorry for the OT
> post, but the
> workaround is related to CF so I figured I'd try.  Any help would be
> appreciated!
>  
> John Burns
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to