hi,

situation: i have php file wich generates xlm data, wthen i have repeater in viewstack to generate viewstack elements, and I need to make links in first element of viewstack to other viewstack elements, here is my code:

Code:
	 <mx:Script>
	 	<![CDATA[
	 		[Bindable]
            public var st:Object;
            
	 		public function chId(st:Object):void {
	 			var num:int=st.toString();
	 			stack.selectedIndex=num;
	 		}
	 		public function init():void {
	 			question.send()
	 			fin.play([d]);
				fin.play([box]);
	 		}
	 	]]>
	 </mx:Script>
	<mx:Fade alphaFrom="0" alphaTo="1" id="fin" />
	<mx:HTTPService url="data/kolekcijos.php" id="question"  useProxy="false" resultFormat="e4x"/>
	<mx:XMLListCollection id="myXC"
            source="{question.lastResult.q}"/>
	
	 <mx:Canvas width="99.9%" height="100%" horizontalScrollPolicy="off">	
	 <mx:ViewStack id="stack" selectedIndex="0" height="100%" width="100%" x="10"  y="5">
	  	<mx:VBox label="id0" id="box" width="100%" height="100%"  horizontalScrollPolicy="off" >
	 	<mx:Repeater id="d" dataProvider="{myXC}">
   	 		<mx:Canvas>
   	 		<mx:Image source="{d.currentItem.img}"  verticalCenter="0" width="120" height="90" 
   	 			useHandCursor="true" buttonMode="true" mouseChildren="false" click="chId([d.currentItem.idd])"/>
   	 		<mx:Text text="{d.currentItem.info}"  color="#AE917C" styleName="Labelrec" width="433" x="147" verticalCenter="0"/>
   	 	</mx:Canvas>
   	 	<mx:Image source="img/stroke.jpg"/>
   	 	</mx:Repeater>
	 	</mx:VBox>
	 	<mx:Repeater id="f" dataProvider="{myXC}">
	 		<mx:VBox label="id{f.currentItem.idd}" width="100%" height="100%">
	 		
	 		<mx:Label text="{f.currentItem.info} {f.currentItem.id}" color="#F1FDFF"/>
	 		</mx:VBox>
	 	</mx:Repeater>
	</mx:ViewStack>
</mx:Canvas>
so how to make work links, talking about click="chId([d.currentItem.idd]),
d.currentItem.idd is the number, how must look function to change viewstac k vbox?