/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var vid:Video; var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); var customClient:Object = new Object(); customClient.onMetaData = metaDataHandler; ns.client = customClient; ns.play("video.flv"); vid = new Video(); vid.attachNetStream(ns); addChild(vid); function asyncErrorHandler(event:AsyncErrorEvent):void { trace(event.text); } function metaDataHandler(infoObject:Object):void { vid.width = infoObject.width; vid.height = infoObject.height; }
URL: http://macromediastudiomx.de/devnet/flash/quickstart/metadata_cue_points.html