-
[RESOLVED] Textformat tabstops problem with loading dynamic text
Hi team!
Basically what I have is a dynamic text field that gets text into it from an external file using loadVars(). I have got every single HTML tag to work, except for the one I really need, which is the tabstops attribute of the <textformat> tag.
The content I have is like so:
Code:
<textformat tabstops='[50,100]'>Damn stupid\t tabstops\t doesn't work.</textformat>
Which displays as:
Code:
Damn stupid\t tabstops\t doesn't work.
Does anyone have any suggestions as to what the problem could be? I really need this to work, as for my purposes it is not practical to set up two dynamic text boxes in two "columns", and obviously I cannot hardcode the text into the timeline, as I need it to be dynamic.
Any suggestions would be much appreciated!
-
Try and replace \t by %09 in the textfile.
example:Damn stupid%09 tabstops%09 doesn't work.
Here's an example of more or less the same method. this one works:
Actionscript Code:
var myLV = new LoadVars(); myLV.load("tarifs3.txt"); myLV.onLoad = function(success) { if (success) { //Creates column headers, formatted in bold, separated by tabs var rowHeaders = "<b>Description\tTarifs</b>"; //Creates rows with data
//Sets two tabstops table_txt.htmlText = "<textformat tabstops='[0,300]'>"; table_txt.htmlText += rowHeaders;
table_txt.htmlText += this.myTarifs;
table_txt.htmlText += "</textformat>";
} else { // the vars couldn't be loaded. } };
gparis
-
Brilliant! That fixes it.
The %09, I mean; I didn't need to try the other bit.
Last edited by rickibarnes; 08-25-2010 at 03:49 AM.
Reason: Editing to mention which bit actually fixes it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|