1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| <mx:WindowedApplication initialize="initializeHandler(event)">
<mx:Script>
<![CDATA[
import mx.events.VideoEvent;
private function initializeHandler(event:Event):void
{
video.addEventListener(VideoEvent.COMPLETE, changevideo);
}
private function changevideo(event:VideoEvent):void
{
video.source = 'video2.flv';
video.play()
}
]]>
</mx:Script>
<mx:VideoDisplay id="video" x="10" y="160" width="640" height="480" source="video.flv" autoPlay="true"/>
</mx:WindowedApplication> |