Loading and changing flv videos

I’ve made a class to set up a stream and load the flv using a string variable controlling the name and location of the flv file.

package {
    import flash.display.Sprite;
    import flash.events.*;
    import flash.media.Video;
    import flash.net.NetConnection;
    import flash.net.NetStream;

    public class flvVideo extends Sprite {
		private var flvName:String = "flvs/Altris video.flv";
        private var _connection:NetConnection;
        private var _stream:NetStream;

        public function flvVideo() {
            _connection = new NetConnection();
            _connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
            _connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);

        private function netStatusHandler(event:NetStatusEvent):void {
            switch (event.info.code) {
                case "NetConnection.Connect.Success":
                case "NetStream.Play.StreamNotFound":
                    trace("Unable to locate video: " + flvName);

        private function connectStream():void {
            var _stream:NetStream = new NetStream(_connection);
            _stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
            _stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
            var video:Video = new Video();

        private function securityErrorHandler(event:SecurityErrorEvent):void {
            trace("securityErrorHandler: " + event);
        private function asyncErrorHandler(event:AsyncErrorEvent):void {
            // ignore AsyncErrorEvent events.

This works fine. My problem is thus:

  1. The video is 800x600 and the flvPlayer.fla is 800x600 but the video is only taking up a small corner in the top left rather than displaying full frame.

  2. I don’t know how to pass a string parameter value from a onMouseDown (or whatever clicking is in flash) in my stage back to the flvVideo class.

optional 3. I wanted my flv videos to be loaded into an array and to be called by the flvVideo class depending on the array index provided. Anyone know how to do this?

Any help is much appreciated, its really been a while since i’ve done this,

Rob Bowen