Hi Guillermo,

try this:
private function handleMouseEvent(e:MouseEvent):void{
                        
                        trace(nav_bloque1.getChildIndex(e.target as
DisplayObject));
                        
                }


This way, regardless of how many buttons you add or
delete and regardless of the values associated with
them, you will still get the correct index (zero-based
index of course).

Another way to do this - although rather lengthy - is
to catch the label of the target and look it up back
on the dataprovider associated. You will have to deal
with duplicate labels  this way however.

I would have suggested that you subclass button bar
instead and dispatch a custom rollover event so that
you can get whatever details there is in the data
provider that is associated with the 'mouse-overed'
button.  But if you just need the index, i think the
solution above will be enough.

p.s. are you from the Philippines?

Best,
Leds

--- Guillermo Villasana <[EMAIL PROTECTED]>
wrote:

> Anyone, any thoughts?
> None?
> Thanks
> 
> Guillermo Villasana wrote:
> >
> > Hi again, well sorry about the other post that get
> duplicated, but as I
> > asked before, is there a way to get the index of a
> button in a
> > togglebuttonbar when you just go over the button?
> > here is my code
> > <!-- code -->
> >
> > <mx:ToggleButtonBar id="nav_bloque1" alpha="0.5"
> > useHandCursor=
> >
> > "true" buttonMode="true"
> >
>
itemClick="ChangeContent(nav_bloque1.selectedIndex);"
> >
> >
>
mouseOver="handleMouseEvent(event);getSubnav(nav_bloque1.selectedIndex);"
> > height="26" minWidth="1000" />
> >
> > <!-- code -->
> >
> > I want to change the nav_bloque1.selectedIndex to
> > nav_bloque1.mouseOverIndex or something like that
> so I can do some other
> > functions with that index. I tried to use var
> > objArray:Array=getObjectsUnderPoint(pt); but I
> don't understand how to
> > get the button as I get a lot of objects with a
> full path.
> >
> > Thanks
> > Terius
> >
> >  
> 
> 



       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
 

Reply via email to