Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FLVPlayer.hx:
- import flash.display.Sprite;
- import flash.net.NetConnection;
- import flash.net.NetStream;
- import flash.media.Video;
- class FLVPlayer extends Sprite
- {
- private var nc:NetConnection;
- private var ns:NetStream;
- private var video:Video
- public function new()
- {
- super();
- nc = new NetConnection();
- nc.connect(null);
- ns = new NetStream(nc);
- ns.play("flash.flv");
- video = new Video();
- video.attachNetStream(ns);
- addChild(video);
- }
- static function main()
- {
- var p = new FLVPlayer();
- flash.Lib.current.addChild(p);
- }
- }
- compile.hxml:
- -swf9 flvplayer.swf
- -main FLVPlayer
Add Comment
Please, Sign In to add comment