Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 77806

Re: AS3 Full Screen script, video crashed

$
0
0

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{

}

          }

}

 

 

 

 

 


Viewing all articles
Browse latest Browse all 77806

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>