Hi I am having a spark videoDisplay control and I have two bttons on clicking button 1 I am changing the source of the VideoDisplay to video1.flv and on clicking button 2 I am chinging the source to video2.flv.
What I need is on changing the video source I have to maintain the time played on video1 to be set on video2.
I Tried like videoDisplay.seek(cTime) where currentTime variable holds the org.osmf.events.TimeEvent Time property which I assing in the currentTimeChange handler of the videoDisplay.
Included the code below.
public var cTime:Number = 0;
public function videoPlayer_playheadUpdate(evt:org.osmf.events.TimeEvent):void
{
cTime = evt.time;
}
public function playVideo(value:String):void
{
videoDisplay.source = value ;
videoDisplay.seek(cTime);
}
<s:VideoDisplay id="videoDisplay" currentTimeChange="videoPlayer_playheadUpdate(event)" />
<s:Button click='playVideo("assets/videos/backview.flv")' label="Back"></s:Button>
<s:Button x="309" y="1" label="Front" click='playVideo("assets/videos/frontview.flv")'></s:Button>
<s:Button click='playVideo("assets/videos/backview.flv")' label="Back"></s:Button>
On Mon, Sep 19, 2011 at 10:35 AM, Arulmurugan <arulmu...@gmail.com> wrote:<s:Button click='playVideo("assets/videos/backview.flv")' label="Back"></s:Button>
Do something like<s:Button click='currentime=c;playVideo("assets/videos/backview.flv");seekto(c)' label="Back"></s:Button>