Skip to main content
Inspiring
February 25, 2008
Question

Styled Text Area Quit Working?

  • February 25, 2008
  • 3 replies
  • 1103 views
I created an entire web site using the attached code to scores of Text Area Components (originally in Flash 8 using AS 2.0 and saved for Flash Player 8 delivery). This code was placed on the frames in which the various Text Area Components resided. Only the Instance Names were changed (both on the component and in the AS for that frame). The sample code I am attaching is one such example of the frame code for a Text Area Component with an Instance Name of "MeetConnallyText".

This was working perfectly online for the past 15 months. I am now using Flash CS3 on Leopard. Today I opened the Fla. for this site, just changed a graphic and the re-published the site using the same settings as always Player 8, AS 2.0, only the Color Styles and CSS Formatting vanished?

I finally replaced the Text Area Components with the ones included with CS3 and gave them matching Instance Names. The external XML Text DOES LOAD into the Text Area Component - so PART of my script appears to be working.

My problem is ALL MY CSS FORMATTING is not being recognized and the BACKGROUND COLOR for the Text Area component is also ignored>

What changed? How can I fix this - the whole site looks like crap!

Thanks for any help
This topic has been closed for replies.

3 replies

kglad
Community Expert
Community Expert
February 28, 2008
the same code works for assigning a stylesheet to a textarea as it does for a textfield. show the code you're using to assign the stylesheet to your textarea and the code used to assign text (and apply one of the styles).
Inspiring
February 28, 2008
kglad,

Sorry I am having so much trouble with this relatively simple task...

I am attaching the code that I have assigned to the frame.

If I add a Dynamic Text Field to the stage this both loads the XML text AND uses the referenced external stylesheet - works perfectly (just no auto scroll bar of course).

If I delete the Dynamic Text Field from the stage and add a Text Area Component with the same instance name ("ServicesText_01"), it still loads the correct XML file into the Text Area, but ignores the application of the External CSS? I just get plain "unstyled" text.

I am sure this is something simple that I am just missing?


Inspiring
February 28, 2008
Here is the code again - not sure it attached to the last post?
kglad
Community Expert
Community Expert
February 27, 2008
you're welcome.
Inspiring
February 27, 2008
kglad,

I have been working with this today still trying to get everything to work...

Your code is working if I create a Dynamic Text Field on stage and give it that instance name, but it is not working with a TextArea Component using that name? The code IS loading the correct XML file into either a Dynamic Text Field OR a TextArea Component, but the CSS is only being applied to a Text Field (not a TextArea Component).
kglad
Community Expert
Community Expert
February 25, 2008
you're assigning a styleSheet property before it's defined. i don't see how that could have ever worked.

to remedy, assign your textfield's styleSheet property in your stylesheet's onLoad() method.
Inspiring
February 25, 2008
Kglad,

Thanks for taking the time to look at this. What you say makes perfect sense... now I am wondering how it ever worked - very confused?

Would it be possible for you to cut-and -paste from the code I attached what you feel needs to be the correct order, just so I can be "sure" I understand what you are saying?

From what I have been reading, apparently you can change the skinning of components like the Text Area in AS 3.0 on the stage just by double-clicking the component. Unfortunately this particular site still contains other components that are AS 2.0 only. Do you know of a skinnable component that is AS 2,0 compatible that allows you to more easily create automatically scrolling text areas with transparent backgrounds and loads dynamic XML text from external files? I seem to need this all the time on every site - just wondered if there was an easier way?

Thanks again for all your help!!
kglad
Community Expert
Community Expert
February 26, 2008
the textarea is the best-known component for handling text.