4 Replies Latest reply on Jan 17, 2008 10:52 AM by Viktar

    VideoDisplay.complete event doesn't get called when a video ends

      I'm having ANOTHER problem with the VideoDisplay control where I set it to play a video, attach an event handler to its complete event, but the complete event never gets triggered/fired! Note this happens consistently with select FLV's - it doesn't happen all the time. To rephrase that, on certain FLV's the VideoDisplay control operates properly and fires the complete event on completion, on other certain FLV's the VideoDisplay control completes but doesn't fire the complete event!!! Am I crazy? Or is this another blatant bug?

      Try this MXML (I'm using Flex 2.01):

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">

      private function complete():void {
      vid.visible = false;
      txt.visible = true;

      <mx:VideoDisplay id="vid" source=" http://ash-v14.ash.youtube.com/get_video?video_id=qP_3_NtG-lo"
      autoPlay="true" width="450" height="338" complete="complete()" />

      <mx:Text id="txt" text="IF YOU SEE ME THE VIDEODISPLAY COMPLETED!!!" fontSize="16" color="0x000000" visible="false" />


      That's a 30 second clip btw. You will never see the "IF YOU SEE ME THE VIDEODISPLAY COMPLETED!!!" text. Now, however, if you change the source to http://www.mediacollege.com/video-gallery/testclips/barsandtone.flv (6 second clip), the clip completes and you WILL see "IF YOU SEE ME THE VIDEODISPLAY COMPLETED!!!"

      Any suggestions as to what may be going on? Thanks!
      Yair Flicker
      SmartLogic Solutions