Selteco Software
Selteco.com > FlashDesignerZONE.com > Tutorials > T1090

Insert YouTube in Flash

How to load and display YouTube movie in Alligator Flash Designer project.

The link to the movie usually looks like this

www.youtube.com/watch?v=5RFxGn6C6ak

If you know the link you can easily insert the movie to your Flash animation.

  1. Launch Alligator Flash Designer
  2. Draw a Sprite

  3. Inside the Sprite choose Frame > ActionScript
  4. Paste the code below and adjust the name of the movie, in this case 5RFxGn6C6ak

    System.security.allowDomain("http://www.youtube.com");
    System.security.loadPolicyFile("http://www.youtube.com/crossdomain.xml");

    loadMovie("http://www.youtube.com/v/5RFxGn6C6ak");

  5. Click OK
  6. Press F9 to run the movie

If yuo want to resize the movie after it has been loaded YouTube use the following commands:

_xscale = 50;
_yscale = 50;

where 50 means 50% of original size. Download source project t1090.zip (5 kb)