I am trying to have a video play, by selecting it from a list. Here is the code:
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" paddingLeft="4" paddingRight="8" paddingBottom="4" horizontalScrollPolicy="off" verticalScrollPolicy="off"> <mx:Script> <![CDATA[ public function toggle():void { if (vd.playing) { vd.stop(); list.visible = true; } else { list.visible = false; vd.play(); } } ]]> </mx:Script> <mx:Parallel id="hideList"> <mx:children> <mx:Array> <mx:Resize target="{list}" widthTo="0"/> <mx:Resize target="{vd}" widthTo="400" heightTo="300"/> </mx:Array> </mx:children> </mx:Parallel> <mx:Parallel id="showList"> <mx:children> <mx:Array> <mx:Resize target="{list}" widthTo="180"/> <mx:Resize target="{vd}" widthTo="240" heightTo="180"/> </mx:Array> </mx:children> </mx:Parallel> <mx:List id="list" width="180" height="100%" selectedIndex="0" hideEffect="hideList" showEffect="showList"> <mx:dataProvider> <mx:Array> <mx:Object label="Applying the CompreSleeve" /> <mx:Object label="Applying Strap Extenders"/> </mx:Array> </mx:dataProvider> </mx:List> <mx:Canvas width="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off"> <mx:VideoDisplay id="vd" width="320" height="240" source="assets/compresleeve.flv" autoPlay="false" complete="list.visible=true"/> <mx:Button label="{vd.playing ? 'Stop' : 'Play'}" click="toggle()" left="8" bottom="8" includeInLayout="false"> </mx:Button> </mx:Canvas> </mx:HBox> How do i create those list items to have the flv file attributes and then pass them to the video player. Thanks so much!