FLEX, VideoDisplay: as autoload without autorun

I am using videoDisplay MXML component for my Flex application.

I would like the video to auto-load (to display the first frame) without auto-starting.

What's the easiest way to do this?

thank

+2


a source to share


2 answers


There are 2 options:

a) FLV movie - set autoPlay = "false" in VideoDisplay



b) Direct Stream - Call player.play (); player.stop () in this order

+1


a source


player.addEventListener(VideoEvent.READY, readyHandler);
player.source = test.mp4;
player.load(); // if autoPlay is false

private function readyHandler(event:VideoEvent):void
{
   player.playheadTime = 0; //  triggers a seek to first frame
}

      



+2


a source







All Articles