Try setting upIcon instead of icon.
I tried that earlier too. I am thinking I will need to learn how to skin my LinkButtons and try to set the icon that way. Anybody got a good example of skinning a LinkButton???
Have an Ordinary Day...
You are probably better off just using a Button with custom skins.
But if you do want to swap out the icon, you'll need to embed the asset as a Class:
public var Pie:Class;
public var Bar:Class;
private function init():void
myLogo.source = Pie;
<mx:Image id="myLogo" click="myLogo.source = Bar"/>
1 person found this helpful
Actually, create this global variable and then use this syntax:
public var imgCls:Class;