Using Communication Components > Using your component with the UserColor component |
![]() ![]() ![]() |
Using your component with the UserColor component
If you write a component and want it to work with the UserColor component, make sure to take the following steps to monitor color change:
1 |
Provide an |
MyComponentClass.prototype.onColorChange = function() { this.setColor(gFlashCom.userprefs.color); } |
|
The |
|
The |
|
2 |
Add your component class to the list of listeners for changes to the |
gFlashCom.userprefs.addListener(this); |
These steps ensure that your onColorChange
method is called whenever you use FCUserColor to change color.
![]() ![]() ![]() |