1 Reply Latest reply on May 14, 2007 2:14 AM by dr_ross

    Globally change text colour

    asljfrg
      In this project the user needs to be able to select "light text on a dark background" (for certain visual difficulties).

      The text is currently dark blue on various pastel boxes, so the text and boxes need to swap to white and the boxes to black. This is easy enough in one file, but there are many .swf's in this project and one click needs to change them all. Using Flash 8.

      Any help much appreciated.
        • 1. Re: Globally change text colour
          dr_ross Level 1
          You could do it easily in design time with a simple JSFL script to enumerate through all the objects in a file, if is a textfield and if current colour is one passed then change to new one. Even have it automatically look through all .fla's in a folder if need be. Not a huge job, just a bit fidley if you have to learn the syntax.

          If you need to do it at runtime then thats a little more tricky, and would be best off using a css like style guide which you either register all the textfields that may need changing, reset the application and having everything redrawn dynamically with classes using the new style variables, or enumerate through all the objects on the stage at runtime, and have all future instances use the new style variables.