"actionscript3_10" By nanyobis (https://pastebin.com/u/nanyobis) URL: https://pastebin.com/UjxV3yR7 Created on: Monday 5th of August 2013 02:51:04 AM CDT Retrieved on: Saturday 31 of October 2020 06:19:42 AM UTC package { import flash.accessibility.Accessibility; import flash.display.Sprite; import flash.events.*; import flash.net.NetConnection; import flash.net.NetStream; import flash.media.Video; public class NsExample extends Sprite { private var nc:NetConnection; private var ns:NetStream; private var video:Video; public function NsExample() { video = new Video(); addChild(video); nc = new NetConnection(); nc.objectEncoding = 0; nc.client=this; nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus); nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onError); nc.connect('rtmp://live.7cast.net/live'); } private function startStreaming() { ns = new NetStream(nc); ns.client = this; ns.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus); ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onError); ns.play("fejke5o3a35nyt7"); video.attachNetStream(ns); } private function onNetStatus(event:NetStatusEvent):void { switch(event.info.code) { case 'NetConnection.Connect.Success': trace('NetConnection.Connect.Success'); startStreaming(); break; default: trace(event.info.code); } } private function onError(event:AsyncErrorEvent):void { trace(event); } public function onMetaData(data) { for(var i in data){ trace(i + " = " + data[i])} video.width = data.width; video.height = data.height; video.x = (stage.stageWidth - video.width)/2; video.y = (stage.stageHeight - video.height)/2; } public function onBWDone () { trace("on Bandwidth Done "); } } } output NetConnection.Connect.Success NetStream.Play.Reset NetStream.Play.Start audiocodecid = .mp3 videocodecid = VP62 copyright = presetname = Custom author = framerate = 15 width = 320 audiosamplerate = 11025 description = height = 240 videodevice = ManyCam Virtual Webcam title = audiodevice = Microphone (Avnex Virtual Audio audiochannels = 1 videokeyframe_frequency = 10 creationdate = Mon Aug 05 03:42:00 2013 rating = videodatarate = 100 keywords = audioinputvolume = 75 audiodatarate = 18 note >the window size is 640x480 >the video is 320x240 >the 320x240 video does not stretch to fit the 640x480 video how do you automatically stretch the video to the frame?