10 Replies Latest reply on Mar 1, 2008 12:42 PM by johnd59898678

    Styled Text Area Quit Working?

    johnd59898678 Level 1
      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
        • 1. Re: Styled Text Area Quit Working?
          kglad Adobe Community Professional & MVP
          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.
          • 2. Re: Styled Text Area Quit Working?
            johnd59898678 Level 1
            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!!
            • 3. Re: Styled Text Area Quit Working?
              kglad Adobe Community Professional & MVP
              the textarea is the best-known component for handling text.

              • 4. Re: Styled Text Area Quit Working?
                johnd59898678 Level 1
                kglad,

                Thanks for clarifying... I will be testing this later today and will get back.
                • 5. Re: Styled Text Area Quit Working?
                  kglad Adobe Community Professional & MVP
                  you're welcome.
                  • 6. Re: Styled Text Area Quit Working?
                    johnd59898678 Level 1
                    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).
                    • 7. Re: Styled Text Area Quit Working?
                      kglad Adobe Community Professional & MVP
                      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).
                      • 8. Re: Styled Text Area Quit Working?
                        johnd59898678 Level 1
                        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?


                        • 9. Re: Styled Text Area Quit Working?
                          johnd59898678 Level 1
                          Here is the code again - not sure it attached to the last post?
                          • 10. Styled Text Area Quit Working?
                            johnd59898678 Level 1
                            kglad,

                            I think I accidentally may have found the problem? I think I may have been using an mCom component for the TextArea originally? I dragged a new TextArea Component out onto the stage from CS3 and it asked if I wanted to REPLACE the existing component in the Library and I said "Yes" - now everything is working with the ORIGINAL frame code I posted?

                            You can see the styled TextAreas working at http://www.drconnally.com > Services - choose a category from the drop-down menu.

                            As I understand I was probably one of the three people who blew $400 on the mCom Components about 3 years ago and they just never got a decent, understandable tutorial up on how to make them work properly. I think the mCom Components were maybe purchased by Adobe and rolled somehow into CS3. Too confusing for me (wish I had the $400 back - never could get them to work right, and they kept saying "next month")

                            Thanks again for your assistance.