Posted By

zeman on 07/10/08


Tagged

textmate video


Versions (?)

Who likes this?

8 people have marked this snippet as a favorite

Wiederkehr
abdsign
farrellj
lzyy
THEPWN3R
Pingpongbal
motionmediasolutions
dubogii


video


 / Published in: ActionScript 3
 

  1. var video:Video = new Video(380, 214);
  2. addChild(video);
  3.  
  4. var nc:NetConnection = new NetConnection();
  5. nc.connect(null);
  6.  
  7. var ns:NetStream = new NetStream(nc);
  8. ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);
  9.  
  10. function onStatusEvent(stat:Object):void {
  11. trace(stat.info.code);
  12. }
  13.  
  14. var meta:Object = new Object();
  15. meta.onMetaData = function(meta:Object){
  16. trace(meta.duration);
  17. }
  18.  
  19. ns.client = meta;
  20.  
  21. video.attachNetStream(ns);
  22.  
  23. ns.play("video.flv");

Report this snippet  

You need to login to post a comment.