A need to create at runtime some buttons and set their icons.
I found a problem to do that in ActionScript. In MXML is easy
to set the icon just use a syntax like this: <mx:Button
label="some text" icon="images/ok.png"/>
But in ActionScript how I can set the icon ?
I need to create the icon by a path passed as a parameter.
The user want to create a button with a label and an icon so
call a method like this (that return and instance of Button):