We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

damarev on 09/15/08


Tagged

YouTube


Versions (?)


Who likes this?

1 person has 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.