# Using VideoDisplay and FMS 3 for recorded video playback

**URL:** https://forum.kirupa.com/t/using-videodisplay-and-fms-3-for-recorded-video-playback/251323
**Category:** flash
**Created:** [February 7, 2008, 11:23am UTC](https://forum.kirupa.com/t/using-videodisplay-and-fms-3-for-recorded-video-playback/251323 "2008-02-07T11:23:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![shubs6](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@shubs6](https://forum.kirupa.com/u/shubs6)
#### Post date: [February 7, 2008, 11:23am UTC](https://forum.kirupa.com/t/using-videodisplay-and-fms-3-for-recorded-video-playback/251323/1 "2008-02-07T11:23:05Z")

</div>

Hi Friends,

In my application i want to play a pre-recorded flv which is stored in C:\Program Files\Adobe\Flash Media Server 3\applications\MyVideoApp in a VideoDisplay Component. I’m getting all sorts of runtime errors and not able to play.

Please help…  
Note: I’m not keeping any main.asc on the server coz I have kept value of autoBandWidthDetection=“false”. I was not able to understand main.asc’s component so i took this route

```auto

    <mx:VideoDisplay x="27" y="36" width="269" height="194" id="Play_video" autoBandWidthDetection="false"/>
    <mx:Script>
        <![CDATA[
                import flash.net.NetStream;
                import flash.net.NetConnection;
                import flash.events.NetStatusEvent;
               
                public function init() : void
                {
                    var netConn:NetConnection = new NetConnection();                                       
                    //netConn.connect("rtmp://URLOfMyServer/MyVideoApp/my_recorded_stream.flv");
                    netConn.connect("rtmp://192.168.0.105/VideoStream/my_recorded_stream.flv");
                    netConn.addEventListener(NetStatusEvent.NET_STATUS , netStatus);
                }                   
                public function netStatus(event:NetStatusEvent) : void
                {
                    var info:Object = event.info;
                    trace(info.code);
                   

                    switch(info.code)
                    {
                        case "NetConnection.Connect.Success":
                            var nc:NetConnection = NetConnection(event.target);
                            var stream:NetStream = new NetStream(nc);
                            //stream.play("my_recorded_stream.flv");
                            Play_video.source = nc.uri;
                            //stream.client = Play_video;                             
                            Play_video.play();
                           
                        break;
                       
                        case "NetConnection.Connect.Closed":

                        break;
                    }
                   
                }
        ]]>
    </mx:Script>   

```
