I believe you want to listen for the change event of the TabNavigator
component. Your handler will catch an IndexChangedEvent
<http://livedocs.adobe.com/labs/flex3/langref/mx/events/IndexChangedEvent.html>
from which you can then obtain the newIndex property to get the desired
value.
hth
Scott
Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com
Harry Saputra wrote:
How to get Tabnavigator index value when I click TabControl ?
I am used Canvas on as in Tabnavigator.
mx:TabNavigator id="tnJadwal" right="10" left="10" top="10" bottom="10"
tabWidth="50">
<mx:Canvas label="Senin" width="100%" height="100%"></mx:Canvas>
<mx:Canvas label="Selasa" width="100%" height="100%"></mx:Canvas>
<mx:Canvas label="Rabu" width="100%" height="100%"></mx:Canvas>
<mx:Canvas label="Kamis" width="100%" height="100%"></mx:Canvas>
<mx:Canvas label="Jumat" width="100%" height="100%"></mx:Canvas>
</mx:TabNavigator>
When I click label Senin, I want get a value 0, Selasa = 1, Rabu = 2, ...
Thanks before..