ButtonBar, if you used it, has a dataProvider that represents each button in the bar. Show us some sample code so we can see what direction you're going in
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mazarflex Sent: Thursday, May 31, 2007 12:03 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: create new button with an icon so i am making a toolbar each button has a specific name (ex."CmdInfo"). in sql i have a procedure. if you pass it "CmdInfo" is returns "F" meaning visibility=false. i need to loop through all of the buttons on my form and pass their names to SQL. i dont know where to start i thought i had it with an array but i could not do the icon or the click. ugh!!! help me please thank you --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]> wrote: > > Button icons cannot be loaded at runtime. They must be embedded in the > app. > > > > ________________________________ > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of mazarflex > Sent: Thursday, May 31, 2007 10:29 AM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] create new button with an icon > > > > i have created the buttons and ran them through a Stored Procedure to > set visibility. now i am tring to asign the icons dynamically. i cannot > get it to work with the set style. not sure how to assign icons @ run > time. heres the funciton calling from an array of buttons. it does not > work. it will create the button but not the icon > > CreateIt(cmds[1],cmds[1].icon) > > public function CreateIt(l_cmdID:Button,l_filePath:String):void{ > var l_cmdID:Button = new Button > l_cmdID.setStyle("icon",l_filePath) > this.HB1.addChild(l_cmdID) > } >