3 Replies Latest reply on Jul 27, 2007 9:24 AM by Michael Kraft

    videoDisplay playing flv with sound but no picture...

    Clark_Kent101 Level 1
      Hi Everyone,

      I'm hoping someone can help with an annoying problem that isn't making much sense to me.... I have an mxml component that is based on an HBox, which houses a single Video Display control. In the main application file I add this component which houses the Video Display control to a canvas using addChild. What I then do is I play different flv files by containing each flv file name in an array, and then bind the next flv name to the source of the Video Display control in order to play the correct video... so in other words...



      [Bindable] private var _arrFLVs:Array = new Array("vid1.flv", "vid2.flv", "vid3.flv");

      [Bindable] private var _currentFLV:String;

      [Bindable] private var _i:int;

      public function init():void
      _currentFLV = _arrFLVs[_i];


      <mx:VideoDisplay width="398" height="282" id="videoDisplay" autoPlay="true" source="flvs/{_currentFLV}" />


      I have other functions which increment the _i variable. So basically what happens is when the video has finished playing, an event handler executes which is listening for the end of the video, the event handler then executes another function which removes the component with the video player from the canvas and adds a different component to display a series of images, once the images has finished cycling through what it needs to cycle through I remove that image component and add the video component back onto the canvas to display the next flv. This process repeats itself once all videos has been shown and then starts over again. The problem I'm experiencing is that every now and then when the video is supposed to be played, it gets added successfully to the canvas using addChild, the correct source gets assigned to the video player, but i see no image when it starts playing. I hear sound, but no picture. I know the correct source is being assigned to the video player because I trace it before and while its playing the video, aside from tracing the source, i hear the audio of the flv currently playing so i know its the correct flv - only problem is that there is no picture. The picture not displaying happens randomly, so for example if the first 4 flv's have finished playing the 5th won't show a picture although i hear the sound, then the 6th will work fine. When the entire process begins again, the 5th will work fine, but the 6th and 7th flv won't. This is what totally confuses me.

      What I don't understand is if the correct source has been assigned to the video display control and the correct flv starts playing, why do i hear sound but no picture?

      Could this be some sort of bug in the flash player? I'm using Adobe Flash Player 9,0,28,0.

      If anyone can provide me with some advice/opinions/idea to give me some sort of clue that would be grand :).

      Thanks for your time,

      - Tony