LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 


  #1  
Old 03-30-2005, 03:05 PM
theboyofspewn theboyofspewn is offline
Registered User
 
Join Date: Mar 2005
Posts: 7
Rep Power: 0
theboyofspewn is on a distinguished road
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?
Reply With Quote
  #2  
Old 03-31-2005, 05:27 AM
Scottae's Avatar
Scottae Scottae is offline
God Moderator
 
Join Date: Oct 2003
Location: United States
Posts: 6,532
Rep Power: 16
Scottae is on a distinguished road
Are you embedding fonts?
__________________
Our greatest glory is not in never falling but in rising everytime we fall. - Confucius

Blog | Shared Items
Reply With Quote
  #3  
Old 03-31-2005, 06:45 AM
theboyofspewn theboyofspewn is offline
Registered User
 
Join Date: Mar 2005
Posts: 7
Rep Power: 0
theboyofspewn is on a distinguished road
I am embedding fonts
Reply With Quote
  #4  
Old 03-31-2005, 01:35 PM
Scottae's Avatar
Scottae Scottae is offline
God Moderator
 
Join Date: Oct 2003
Location: United States
Posts: 6,532
Rep Power: 16
Scottae is on a distinguished road
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
Reply With Quote
  #5  
Old 03-31-2005, 06:49 PM
FrozenMedia's Avatar
FrozenMedia FrozenMedia is offline

Frozen Moderator
 
Join Date: Apr 2003
Location: United Kingdom
Posts: 2,701
Rep Power: 13
FrozenMedia is on a distinguished road
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
Reply With Quote
  #6  
Old 03-31-2005, 07:16 PM
Scottae's Avatar
Scottae Scottae is offline
God Moderator
 
Join Date: Oct 2003
Location: United States
Posts: 6,532
Rep Power: 16
Scottae is on a distinguished road
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
Reply With Quote
  #7  
Old 04-01-2005, 05:19 AM
theboyofspewn theboyofspewn is offline
Registered User
 
Join Date: Mar 2005
Posts: 7
Rep Power: 0
theboyofspewn is on a distinguished road
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
Reply With Quote


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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




All times are GMT. The time now is 11:38 PM.