I believe the reason is performance. If you could directly set a style property, the way it would then have to be applied internally takes longer than using setStyle() or getStyle() methods. It has to do with style inheritance and propagating a style property.
 
And really, it's not that much harder to do. Instead of:
 
 b2.color= b1.color;
 
You do:
 
  b2.setStyle("color",b1.getStyle("color"));

 
Note that I don't think you can _bind_ to style properties, which is a greater limitation IMHO.
 
matt horn


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 16, 2005 3:41 PM
To: [email protected]
Subject: [flexcoders] Question about changing the color of something

How come you can't change the color of something by simply saying the color of this object is equal to the color of that object and why does the message come up that says
"The property,'color' is a style. Use the getStyle and setStyle methods to read and write it?

Reply via email to