you should check the netstream class to see how to add video controls.
to remove the error and position your video:
l?
package {
import flash.display.SimpleButton;
import flash.events.MouseEvent;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
public class clickbutton extends SimpleButton {
public function clickbutton() {
this.addEventListener(MouseEvent.CLICK, clickF);
}
private function clickF(e:MouseEvent):void{
var nc:NetConnection=new NetConnection();
nc.connect(null);
var ns:NetStream=new NetStream(nc);
var video:Video=new Video(320, 200);
video.x=(stage.stageWidth-320)/2;
video.y=(stage.stageHeight-200)/2;
ns.client=this;
this.parent.addChild(video);
video.attachNetStream(ns);
ns.play("video_test.flv");
}
private function onMetaData():void{
}
}
}