Posted By

dareng on 02/23/11


Tagged

as3


Versions (?)

FLV control etc


 / Published in: ActionScript
 

  1. // load flv
  2. var vid:Video = new Video(640, 480);
  3. addChild(vid);
  4.  
  5. var nc:NetConnection = new NetConnection();
  6. nc.connect(null);
  7.  
  8.  
  9. var ns:NetStream = new NetStream(nc);
  10. vid.attachNetStream(ns);
  11.  
  12. var listener:Object = new Object();
  13. listener.onMetaData = function(evt:Object):void {};
  14. listener.onCuePoint = onCuePoint;
  15.  
  16. ns.client = listener;
  17.  
  18. ns.play("flash/btv/assets/intoTheVault1.flv");
  19.  
  20. function onCuePoint(cuePoint:Object):void {
  21. trace(cuePoint.name + " " + cuePoint.time);
  22. if(cuePoint.name=="theEnd") {trace("YEY")};
  23. }
  24.  

Report this snippet  

You need to login to post a comment.