hi its a little more complicated than i mentioned it. i am using a custom flvplayer component developed by some guys which i load into another component that holds my datagrid. here is my code maybe you can be able to help me when you view like this.
"FLaVr.mxml" <?xml version="1.0" encoding="utf-8"?> <mx:ViewStack backgroundColor="#333333" width="50%" height="100%" creationComplete="init()" mouseDown="this.mouseInteracting=true" mouseUp="this.mouseInteracting=false" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:local="components.*"> <mx:Script> <![CDATA[ import mx.controls.Alert; public function init():void { this.setVidSrc(); } //public var vidSrc:String = "../images/video/{parentDocument.dgrid.selectedItem.image}"; public var vidSrc:String = "http://localhost:8500/iestate/images/video/{parentDocument.dgrid.selectedItem.image}"; public var doAutoPlay:String = "yes"; public var caption:String = "Connect Studios | FLaVr"; public function setVidSrc():void { if(this.vidSrc == null){ this.vidSrc = ""; } if(this.vidSrc == ""){ return; } if(this.caption == ""){ this.capCan.visible = false; }else{ this.capCan.visible = true; this.capLbl.text = this.caption; } this.vid.source = this.vidSrc; if(this.doAutoPlay.toLowerCase() == "yes"){ this.vid.play(); } } public function vidComplete():void { this.vid.pause(); } public function togglePlay():void { this.playBtn.selected = true; if(this.vid.playing){ this.playBtn.selected = true; this.vid.pause(); }else{ this.playBtn.selected = false; this.vid.play(); } } public var mouseInteracting:Boolean = false; public function doUpdate():void { if(!(this.mouseInteracting)){ this.vidSlider.value = this.vid.playheadTime; this.vidSlider.maximum = this.vid.playheadMax; } } public function updatePlayhead():void { this.vid.seek(this.vidSlider.value); } ]]> </mx:Script> <mx:Canvas borderColor="#C2C2C2" borderStyle="solid" borderThickness="1" id="can" width="100%" height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" backgroundColor="#333333"> <local:FLaVrPlayer id="vid" playheadUpdate="this.doUpdate()" width="100%" height="100%" horizontalCenter="0" verticalCenter="-25" autoPlay="false" flvPlayheadEnd="this.vidComplete()"/> <mx:Image source="@Embed('../images/slideBack.png')" bottom="16" left="-20"/> <mx:Canvas id="controls" width="100%" height="60" bottom="0" horizontalScrollPolicy="off" verticalScrollPolicy="off"> <mx:Canvas id="capCan" width="100%" horizontalCenter="0" bottom="0" visible="true" height="28" styleName="capt" borderSkin="@Embed(source='../images/vid_capt_bg.png')" horizontalScrollPolicy="off" verticalScrollPolicy="off"> <mx:Label x="10" y="4" text="Caption:" color="#FFFFFF" fontFamily="Arial" fontSize="12"/> <mx:Label x="57" y="4" text="..." color="#FFFFFF" fontFamily="Arial" fontSize="12" width="{this.width-this.capLbl.x-5}" id="capLbl"/> </mx:Canvas> <mx:Button x="10" y="0" width="23" height="22" icon="@Embed(source='../images/rewind_icon.png')" click="this.vid.playheadTime-=3" styleName="btn"/> <mx:Button x="60" y="0" width="23" height="22" icon="@Embed(source='../images/stop_icon.png')" click="this.vid.stop()" styleName="btn"/> <mx:Button x="85" y="0" width="23" height="22" icon="@Embed(source='../images/ff_icon.png')" click="this.vid.playheadTime+=3" styleName="btn"/> <mx:Button x="35" y="0" width="23" height="22" icon="@Embed(source='../images/play_icon.png')" selectedUpIcon="@Embed(source='../images/pause_icon.png')" id="playBtn" click="this.togglePlay()" styleName="btn"/> <mx:Canvas y="8" height="22" borderThickness="0" horizontalScrollPolicy="off" verticalScrollPolicy="off" right="0.049987793" left="127"> <mx:HSlider minimum="0" maximum="{this.vid.playheadMax}" id="vidSlider" horizontalCenter="0" verticalCenter="0" width="90%" thumbRelease="this.updatePlayhead()" liveDragging="false" allowTrackClick="false" styleName="vidSlider" minWidth="0"/> </mx:Canvas> </mx:Canvas> </mx:Canvas> <mx:Canvas width="100%" height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off"> <mx:Tile id="vidThumbs" width="95%" height="95%" horizontalCenter="0" verticalCenter="0"> </mx:Tile> </mx:Canvas> </mx:ViewStack> "sample code from homes.mxml which holds my datagrid and where the flv component is added" <mx:DataGrid width="50%" height="100%" id="dgrid" dataProvider="{dataAr}" rowCount="20" change="animateMapOut();"> <mx:columns> <mx:DataGridColumn headerText="Price" dataField="price"/> <mx:DataGridColumn headerText="BedRooms" dataField="bedrooms"/> <mx:DataGridColumn headerText="BathRooms" dataField="bathrooms"/> <!--<mx:DataGridColumn headerText="Stories" dataField="col4"/>--> </mx:columns> </mx:DataGrid> <player:FLaVr id="flv"/>

