# How do I unload a YouTube video?

**URL:** <https://forum.kirupa.com/t/how-do-i-unload-a-youtube-video/260466>\
**Category:** flash\
**Created:** [May 15, 2008, 10:42pm UTC](https://forum.kirupa.com/t/how-do-i-unload-a-youtube-video/260466 "2008-05-15T22:42:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wildlettuce](https://avatars.discourse-cdn.com/v4/letter/w/cdc98d/32.png) [@wildlettuce](https://forum.kirupa.com/u/wildlettuce)\
**Post date:** [May 15, 2008, 10:42pm UTC](https://forum.kirupa.com/t/how-do-i-unload-a-youtube-video/260466/1 "2008-05-15T22:42:32Z")

</div>

I used the following code to load a YouTube video onto a flash website:

```auto

this.createEmptyMovieClip("video_mc", 10000);
setProperty(video_mc, _x, 275);
setProperty(video_mc, _y, 150);
this.video_mc.loadMovie("http://www.youtube.com/v/wNIlpIwr6yE&hl=en.swf")

```

Worked great, but there is a big problem. The video WON’T GO AWAY! It shows up on every page there after.

Does anyone know how to remove it from the other pages (Actions keyframes)?

I tried putting -

```auto
this.video_mc.unloadMovie("http://www.youtube.com/v/wNIlpIwr6yE&hl=en.swf");

```

on all the other pages, but not surprisingly it caused a scary error.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Nick5185](https://avatars.discourse-cdn.com/v4/letter/n/e95f7d/32.png) [@Nick5185](https://forum.kirupa.com/u/Nick5185)\
**Post date:** [May 16, 2008, 1:09am UTC](https://forum.kirupa.com/t/how-do-i-unload-a-youtube-video/260466/2 "2008-05-16T01:09:10Z")

</div>

Couldn’t you just add:

this.removeMovieClip(“video\_mc”);

You would have to add it to all your pages  
Not sure if that’s what you want to happen

---

<div class="post-metadata">

**Author:** ![wildlettuce](https://avatars.discourse-cdn.com/v4/letter/w/cdc98d/32.png) [@wildlettuce](https://forum.kirupa.com/u/wildlettuce)\
**Post date:** [May 23, 2008, 12:00am UTC](https://forum.kirupa.com/t/how-do-i-unload-a-youtube-video/260466/3 "2008-05-23T00:00:33Z")

</div>

Your solution seemed so clean and perfect, but alas, the YouTube video is still there on every page, mocking me. Any other ideas?
