flexcoders,

Is there a way to jump to a particular time within the videoplayer based on an 
event such as a button click?

button id step1 would jump to 20 seconds into video
button id step 2 would jump to 1:45 into video
button is step 3 would jump to 4:05 into video

Joel

#########Begin Code#############

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"; 
                           xmlns:s="library://ns.adobe.com/flex/spark" 
                           xmlns:mx="library://ns.adobe.com/flex/halo" 
minWidth="1024" minHeight="768">
        <fx:Declarations>
                <!-- Place non-visual elements (e.g., services, value objects) 
here -->
        <fx:String id="xmlText" source="../assets/en_app_data.xml" />
        </fx:Declarations>
        
        
        <fx:Script>
                <![CDATA[
                        protected function 
btn_clickHandler(evt:MouseEvent):void{
                                if (vdPlyr.playing) {
                                        vdPlyr.pause();
                                }
                                vdPlyr.videoElement.videoObject.clear();
                        }
                ]]>
        </fx:Script> 
        
        
        <s:Panel  width="707" height="567" title="Videos"> 
                <s:DropDownList x="112" y="13.5" 
click="btn_clickHandler(event)"></s:DropDownList>
                <s:DropDownList x="367" y="13.5" width="253" 
click="btn_clickHandler(event)"></s:DropDownList>
        
                <s:VideoPlayer id="vdPlyr" horizontalCenter="-3"
                                           verticalCenter="5"
                                           
source="../assets/videos/videblue.flv"  width="540" height="444"/>
                <s:Label x="81" y="18" text="Belt"/>
                <s:Label x="269" y="18" text="Technique/Form"/>
                
        </s:Panel>
        <s:Panel x="730" y="0" width="284" height="567" title="Step by step 
instruction">
                <mx:TextArea x="10" y="10" width="264" height="511" 
htmlText="{xmlText}" editable="false"/>
                <s:Button x="42" y="49" label="Button" id="step1"/>
                <s:Button x="42" y="95" label="Button" id="step2"/>
                <s:Button x="42" y="142" label="Button" id="step3"/>
        
        </s:Panel>
</s:Application>

Reply via email to