views:

91

answers:

2

I'm trying to change the background color and or text color of a BorderContainer in flex 4 using Action Script, but have not idea how to.

The Border Container component doesn't seem to have any properties like:

idname.color = "#333333"; idname.backgroundcolor = "#333333";

How might I go about doing this?

thanks!

A: 

Not sure if this is the only way to do it, but by creating a css style your able to change the background, text color, and other style attributes and call the style's name in Action Script.

idname.styleName = "css-stylename";
Adam
+1  A: 

You can set styles (which are different from properties) in ActionScript like so:

idname.setStyle("backgroundColor", 0xff0000);
Wade Mueller