Let's create client side, just edit Red5FirstClient in Eclipse/Flex from the previous article.

package
{

    import flash.net.NetStream;
    import flash.net.NetConnection;
    import flash.net.ObjectEncoding;
    import flash.text.TextField;
    import flash.media.Video;
    import flash.events.MouseEvent;
    import flash.events.NetStatusEvent;
    import flash.display.Sprite;
    import flash.display.MovieClip;

    public class Red5FirstClient extends Sprite
    {

        private var nc:NetConnection;
        private var ns:NetStream;
        private var items:Array;
        private var video:Video;

        public function Red5FirstClient()
        {

            nc = new NetConnection( );
            nc.client = this;
            nc.objectEncoding = ObjectEncoding.AMF0;
            nc.addEventListener( NetStatusEvent.NET_STATUS , netStatus );
            nc.connect( "rtmp://localhost/firstapp" , true );

            //we store the buttons representing streams here

            items = [ ];

            // creating a video instance

            video = new Video( );

            //place it to the right

            video.x = 70;

            //attach it to the display list

            addChild( video );

        }

        private function netStatus ( event:NetStatusEvent ):void
        {

            trace( "netStatus: " + event.info.code );

        }

        public function message ( message:Object ):void
        {

            trace( "message " );

            //red5first will send stream list here, and we create a button for every stream

            for ( var a:* in message )
                addItem( message[a] );

        }

        // creating buttons

        public function addItem ( properties:Object ):void
        {

            trace( "addItem" );

            // a button is 20 px height, and we need 2 px row between buttons

            var height:Number = items.length * 22;
            var newItem:MovieClip = new MovieClip( );

             // button label

            var newField:TextField = new TextField( );

            newField.width = 70;
            newField.height = 20;

            // setting stream id as button label


            newField.text = properties.id;

            // storing the other properties in the button

            newItem.id = properties.id;
            newItem.filename = properties.filename;
            newItem.duration = properties.duration;

            newItem.y = height + items.length * 2;

            // drawing background

            newItem.graphics.beginFill( 0x00ff00 , 1 );
            newItem.graphics.drawRect( 0 , 0 , 70 , 20 );
            newItem.buttonMode = true;
            newItem.mouseChildren = false;

            // mouseclick event

            newItem.addEventListener( MouseEvent.CLICK , playItem );

            //attaching label to button

            newItem.addChild( newField );

            addChild( newItem );
            items.push( newItem );

        }

        public function playItem ( event:MouseEvent ):void
        {

            trace( "playItem: " + event.target );

            // is a stream is already playing, close it

            if ( ns != null ) ns.close( );

            // new stream

            ns = new NetStream( nc );

            // onMetaData comes here

            ns.client = this;

            //starting stream

            ns.play( event.target.filename );

            //attach stream to video

            video.attachNetStream( ns );

        }

        public function onMetaData ( message:Object ):void
        {

            trace( "onMetaData: " );

            for ( var a:* in message ) trace( a + " : " + message[a] );

        }

    }

}


Start red5, than run the client, if there are records in the database, buttons will appear in the client, and you can choose and play them, and playing stops after 20 seconds.

After this part creating a startup script is a very good idea, which deletes the previous app from red5/webapps/firstapp/WEB-INF, copies EclipseWorkSpace/Red5FirstApp/WEB-INF under red5/webapps/firstapp, then starts red5.

On OS X, it looks like this:

#!/bin/bash
rm -r /Applications/Red5/webapps/firstapp/WEB-INF
cp -r /Users/milantoth/Store/Development/Workspace/Red5FirstApp/WEB-INF /Applications/Red5/webapps/firstapp

cd /Applications/Red5
./red5.sh


And that's all. Knowing this you can go on with red5 and flash.