Skip to main content
Participating Frequently
July 16, 2009
Answered

Playing FMS streams from Flash 7

  • July 16, 2009
  • 1 reply
  • 1771 views

In order to play a FMS stream (live or on demand), either an FLVPlayback component or the Video class is needed.

And they require ActionScript 3 and Flash 8 or above.

As far as i know , Youtube, Dailymotion and Google Video stream their on demand videos from a FMS, and their players are compatible with Flash 7.

How can they achieve this?  If Youtube, Google and Dailymotion do that, i deduce it's possible..

I tried to create a Flash 7 application that plays a video coming from FMS, using a MediaDisplay component, but it doesn't work well. Sometimes it shows the video, sometimes not.

So i don't think youtube player uses MediaDisplay..

    This topic has been closed for replies.
    Correct answer

    i've got some news:  the FLVPlayback component is available even if the Publish Settings are set to AS2, but only if you have also set Flash Version 8 or above.

    If you choose AS2 + Flash 7 , FLVPlayback and all Video components group disappear, so it seems they don't work in this case.

    So ... how did Google make it?


    You don't need to use the FLVPlayback component.

    You can manually code your netconnection and netstream, and then just attach the video from the netstream to a video object (not a component... the video object).

    As for google's player... I'd need to decompile the .swf to get an idea of how they have things set up, but my guess would be that they don't use the prefabricated video components.

    1 reply

    July 16, 2009

    The video object has been around since Flash MX, and it's certainly possible to play an FMS stream on a client targeting Flashplayer 7/AS2. The only real limitation is that you can't display h.264 video in a Flash 7 client (the codec wasn't introduced until FP9).

    Participating Frequently
    July 16, 2009

    Ok thank you i've found out that it's possible to use FLVPlayback in AS2 , creating the object from code. ( Flash CS3 doesn't let you import it visually in AS2 mode.. it's strange).

    i'm using Flash CS3 Pro, i've created an AS2 .FLA file and exported it as an SWF for Flash 7.

    The stage is empty, i have only put this code in the Frame 1 Level 1 actions:


    import mx.video.*;


    this.attachMovie("FLVPlayback", "my_FLVPlybk", 10, {width:320, height:240, x:100, y:100});


    my_FLVPlybk.skin = "file:///path_to_FlashCS3_folder/en/Configuration/FLVPlayback Skins/ActionScript 2.0/ClearOverPlaySeekMute.swf"
    my_FLVPlybk.contentPath = "rtmp://x.x.x.x:1935/vod/media/out.flv";
    my_FLVPlybk.play();

    it shows nothing but a white stage

    what i've mistaken?

    the server address and skin path are correct, the server is running and no firewall is blocking it, and the FLV remote file exists.

    i've checked the FMS administration console, and it shows no client connected.

    Participating Frequently
    July 16, 2009

    i've also tried this, with no success

    import mx.video.*;
    _root.attachMovie("FLVPlayback", "my_FLVPlybk", 1000, {width:320, height:240, x:100, y:100});
    my_FLVPlybk.contentPath = "
    http://www.helpexamples.com/flash/video/water.flv";  // this file exists