1. Technology
Send to a Friend via Email
You can opt-out at any time. Please refer to our privacy policy for contact information.

ActionScripting Basics: .textColor with Dynamic Text Fields


Next edit to add:

onClipEvent (mouseDown) {
redwidth=getProperty ( _root.red, _width) ;

This tells Flash that the color should be equal to the value 0x0000FF--or, to put it simply, blue. The text color must be an RGB value written in Flash as 0xRRGGBB; the easiest way to determine your color is to use an HTML hexadecimal value for the RRGGBB. You can find a list of browser-safe HTML color codes here.

Now, when you click the mouse to display the width of the Movie Clip object, the text color will also change.

Demonstration here.

©2014 About.com. All rights reserved.