Up and running, thanks again.

--- In [email protected], "valdhor" <valdhorli...@...> wrote:
>
> Yes, this requires a class. Try creating variables to hold your icons and 
> then declaring them in your class...
> 
> [Embed(source="icons/more.gif")] private var moreIcon:Class;
> 
> Then use the class in the setStyle method...
> 
> (issButArray[i] as Button).setStyle("icon", moreIcon);
> 
> 
> 
> --- In [email protected], "criptopus" <sd_brown@> wrote:
> >
> > issButArray[i].setStyle("icon","@Embed(source='icons/more.gif')");
> > 
> > Type Coercion failed: cannot convert "@Embed(source='icons/more.gif')" to 
> > Class?
> > 
> > - New error?
> > 
> > --- In [email protected], Robert VanCuren Jr <robert.vancuren.jr@> 
> > wrote:
> > >
> > > 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_brown@> 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