1 person found this helpful
The hostComponent attribute is a reference to the component instance that the skin is currently attached to. It is a convenient way to access properties or methods from the component.
In general, you want to push data from the component to the skin. However, on occasion, you need to pull information from the component to the skin and hostComponent provides a way to do that.
<In general, you want to push data from the component to the skin.
Can you please elaborate a bit?
Also, can I have hostComponent for mx controls?
What he meant by "you want to push data from the component to the skin": For example, you have a property in the hostComponent, let's say, you are skinning a button, and you want to do something based on the button height, you just use hostComponent.height.
Only spark skins have the hostComponent property, so you can't use it with mx controls.