
Welcome Guest
|
#1
|
|||
|
|||
|
textarea component html problems
I am attempting to use a textarea component to dynamically load text from .txt files. Some of the .txt files have html code in them, some font color changes and an email link, but when I run the .swf, the .txt files load as is, displaying the html code as text. When I turn the textarea's html setting to true, no text will display. Any thoughts as to how I can get the text to display with the links and changed colors?
|
|
#2
|
||||
|
||||
|
Are you embedding fonts?
__________________
Our greatest glory is not in never falling but in rising everytime we fall. - Confucius Blog | Shared Items |
|
#3
|
|||
|
|||
|
I am embedding fonts
|
|
#4
|
||||
|
||||
|
That may be your problem then. If you are embedding fonts, you are only going to get one style of the font. For example, if you embed Arial, regular Arial font type will show up fine. But if you use bold or italic tags, they won't show up because those styles of the font are not embedded.
__________________
Our greatest glory is not in never falling but in rising everytime we fall. - Confucius Blog | Shared Items |
|
#5
|
||||
|
||||
|
This usually happens when the textfield's properties and text are set in the wrong order. Could you paste your code? Also, are you setting the textfield.htmlText = "<p>html here</p>" rather than the .text property. One last thing, try wrapping the HTML in P tags as shown, Flash likes P tags.
Rich
__________________
Blog: http://www.richardleggett.co.uk | If your happy with the help, let us know about it
|
|
#6
|
||||
|
||||
|
He/she is referring to a textarea component. They don't have htmlText property. Only the text property. You only have to set the html property for the textarea.
__________________
Our greatest glory is not in never falling but in rising everytime we fall. - Confucius Blog | Shared Items |
|
#7
|
|||
|
|||
|
even so, here is the code that I have in my file.
This is in the first frame of the movie Actionscript:
import mx.styles.CSSStyleDeclaration;
_global.styles.TextArea = new CSSStyleDeclaration();
_global.styles.TextArea.setStyle("disabledColor", null);
_global.styles.TextArea.setStyle("color",0xfb683a);
_global.styles.TextArea.setStyle("borderStyle", "none");
_global.styles.TextArea.setStyle("embedFonts",true);
_global.styles.TextArea.setStyle("fontFamily","trebuchet");
_global.styles.TextArea.setStyle("fontSize",14);
_global.rollin = 0;
_global.data2 = "super";
_global.changetext = 0;
skip.onRelease = function(){
gotoAndPlay("skip");
}and this is on the frame that the textarea component is on Actionscript:
function loadtext(){
lvText.onData = function(data):Void {
information.editable = false;
information.html = true;
//information.font = "trebuchet";
//information.color = "0xfb683a";
information.Text = data;
}
if(_global.data2 != "super"){
lvText.load(_global.section+".txt");
}else{
information.Text = " ";
}
_global.changetext = 0;
}this is the way the code is set up for the component. the two commented out lines in my loadtext() function are there for a dynamic text box that I am using for testing. the dynamic text box works fine, when i switch to information.htmlText, except i need to add a scroller, and i would prefer to get the component working with html, since a scroller is built-in to the component. The thing that confuses me, is that I have another project that I set up essentially the same way, and it works fine with the html set to true. I even copied the code off of that project to this project and changed a couple variables here and there to fit, and in this code the html won't work. Any ideas? Last edited by Scottae : 04-01-2005 at 03:27 PM Reason: Format with AS tags |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| styled textArea - write to html? | skitzer | Flash 8 |
1 | 12-08-2006 09:19 AM |
| help using actionscript to load html in textarea component | napScript | Newbies |
3 | 10-02-2006 11:47 PM |
| mask prevents showing of text in TextArea component... | wlandymore | Actionscript 2.0 Components |
1 | 08-09-2005 11:06 PM |
| I have problems embedding fonts in textArea component | cayohueso | Actionscript 2.0 Components |
2 | 05-27-2005 02:56 PM |
| textArea component HTML | relish1227 | Flash MX 2004 |
6 | 05-11-2004 07:49 AM |




