# YouTube video in my swf?

**URL:** <https://forum.kirupa.com/t/youtube-video-in-my-swf/311932>\
**Category:** Uncategorized\
**Created:** [July 20, 2010, 5:23pm UTC](https://forum.kirupa.com/t/youtube-video-in-my-swf/311932 "2010-07-20T17:23:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![frescono](https://avatars.discourse-cdn.com/v4/letter/f/c37758/32.png) [@frescono](https://forum.kirupa.com/u/frescono)\
**Post date:** [July 20, 2010, 5:23pm UTC](https://forum.kirupa.com/t/youtube-video-in-my-swf/311932/1 "2010-07-20T17:23:40Z")

</div>

I’m trying to play YouTube videos inside my flash movie.  
I can get it to load the YouTube player and play the video but the problem is that I cant get it to stop.  
When I unload the MC I loaded the video into It deletes the player completely but the audio keeps playing.

I get a bunch of security warnings when I play it locally, but when I upload it to the server it still doesn’t work.  
I’m very confused with this one.

Here’s the AS I am using:

movieMC.loadMovie(“[http://www.youtube.com/v/q-wf2pP7T0Y](http://www.youtube.com/v/q-wf2pP7T0Y)”);

closeBTN.onPress = function(){  
unloadMovie(“movieMC”);  
}

I have attached a simple example.  
Appreciate any help
