great idead thank you very much i will try this --- In flexcoders@yahoogroups.com, "Michael Schmalle" <[EMAIL PROTECTED]> wrote: > > Hi, > > How are you defining the buttons dataProvider? Do you use a name in there? > > You could create an extra name field in the dataProvider and loop through > that dataProvider's index whil at the same time grabbing the button > instance. > > Then in the loop send the field dp[name] and the instance to the method, > return a boolean if it is to be included. > > Peace, Mike > > On 5/31/07, mazarflex <[EMAIL PROTECTED]> wrote: > > > > i have a toolbar and i am trying to loop through my 50 buttons and send > > the name to a function. (it is really for user rights and the function > > will send it to SQL to decide wether the user should have access to > > that button) but the jist of it is to send a button to a function in a > > loop or something. with out having to hardcode all the names of the > > buttons > > > > > > > > > > -- > Teoti Graphix > http://www.teotigraphix.com > > Blog - Flex2Components > http://www.flex2components.com > > You can find more by solving the problem then by 'asking the question'. >