Posted By

damarev on 09/15/08


Tagged

YouTube


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

mrjthethird


Attach youtube video in a movieclip


 / Published in: ActionScript
 

  1. var url = 'http://www.youtube.com/v/12Z3J1uzd0Q.swf';
  2.  
  3. var mcLoader:MovieClipLoader = new MovieClipLoader();
  4.  
  5. var listener:Object = new Object();
  6.  
  7. listener.onLoadInit = function(mc:MovieClip) {
  8. trace("onLoadInit: " + mc);
  9. trace(mc._width +' x ' +mc._height);
  10. }
  11.  
  12. mcLoader.addListener(listener);
  13.  
  14. var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth());
  15.  
  16. mcLoader.loadClip(url, container);

Report this snippet  

You need to login to post a comment.