# How to Play Youtube video in Flash AS2 file

**URL:** <https://forum.kirupa.com/t/how-to-play-youtube-video-in-flash-as2-file/326849>\
**Category:** flash\
**Created:** [January 16, 2012, 7:04pm UTC](https://forum.kirupa.com/t/how-to-play-youtube-video-in-flash-as2-file/326849 "2012-01-16T19:04:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michelle\_E](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@Michelle\_E](https://forum.kirupa.com/u/Michelle_E)\
**Post date:** [January 16, 2012, 7:04pm UTC](https://forum.kirupa.com/t/how-to-play-youtube-video-in-flash-as2-file/326849/1 "2012-01-16T19:04:01Z")

</div>

I am trying to play a Youtube video in a Flash SWF.  
I have a button (video\_btn) and a black rectangle movie clip (480 x 365) named video\_mc.  
The AS2 I have for video\_btn is:

video\_btn.onRelease=function(){  
createEmptyMovieClip(“video\_mc”,\_root.getNextHighestDepth());  
video\_mc.loadMovie(“[http://youtube/](http://youtube/)…”);  
};

This does not seem to be working locally. I did try uploading a test swf to a free swf hosting website but it still does not play the Youtube video. Any suggestions as to what I am doing wrong and how to fix it? (Unless Youtube only accepts AS3?).
