you need to use the setStyle method because icon is a style not a property.

myButton.setStyle("icon", source);

On Mon, Mar 15, 2010 at 8:20 AM, criptopus <sd_br...@ntlworld.com> wrote:

>
>
> // Add TLink To Issue Box
> issButArray.push(new Button());
> issButArray[i].icon="@Embed(source='icons/more.gif')";
> issHbxArray[i].addChild(issButArray[i]);
>
> Error :
>
> Cannot create property icon on mx.controls.Button
>
> how do I set a buttons icon programatically?
>
> - Stephen
>
>  
>

Reply via email to