My ‘Flex’ible Experiments

FLVPlayback in Flex

with 3 comments

One thing clearly lacking in Flex is a Videoplayer component like the one found in Flash CS3.  Flex does have a VideoDisplay component , but it do not have controls to interact with video like  play, pause, seek etc.

In few simple steps we can easily use the FLash FLVPlayback in Flex

  1. On windows machine go to Program Files\Adobe\Adobe Flash CS3\en\Configuration\Component Source\ActionScript 3.0\FLVPlayback and copy the “fl” folder containing the FLVPlayback source and paste it in the flex application’s source folder .
  2. Create new actionscript class named Icon.as in the video folder with an empty constructor . This is to get rid of a compiler error like this ” Call to a possibly undefined method Icon.
  3. In the FLVPlayback class on line number 871, wrap the following lines of code in an if statement.

  4. boundingBox_mc.visible = false;
    removeChild(boundingBox_mc);
    boundingBox_mc = null;

The result will look like this

    if(boundingBox_mc){
    boundingBox_mc.visible = false;
    removeChild(boundingBox_mc);
    boundingBox_mc = null;
    };

Finally we need do is to copy the Video player controlbar skins . We can find them in this directory    Program Files\Adobe\Adobe Flash CS3\en\Configuration\FLVPlayback Skins\ActionScript 3.0
Thats it !! . We are good to go now . Click on the image below to view a sample ( Right click to view the source )

Written by subeesh

November 3, 2008 at 7:34 am

3 Responses

Subscribe to comments with RSS.

  1. Hello!
    Thanks for the tutorial… I am having issues though. I’m trying to get the FLVPlayback to stream from my FMS. Is there some secret why it won’t pull in the video?

    dColumbus

    November 11, 2008 at 2:06 am

  2. awesome thanks!

    sgt fgt

    March 31, 2009 at 7:00 pm

  3. thanks a lot! awesome, great help

    poco

    April 3, 2009 at 6:27 pm


Leave a Reply