# Flash Embedded Youtube Videos

**URL:** https://forum.kirupa.com/t/flash-embedded-youtube-videos/303915
**Category:** flash
**Created:** [January 28, 2010, 11:28pm UTC](https://forum.kirupa.com/t/flash-embedded-youtube-videos/303915 "2010-01-28T23:28:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![daaan](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@daaan](https://forum.kirupa.com/u/daaan)
#### Post date: [January 28, 2010, 11:28pm UTC](https://forum.kirupa.com/t/flash-embedded-youtube-videos/303915/1 "2010-01-28T23:28:56Z")

</div>

Hi,

I have three videos embedded in Flash. Every time a new video is a loaded, the sound video from the old video continues to play.

I have tried using removeMovieClip(); and I have tried stopAllSounds(); I have tried ‘delete video\_mc’. Nothing seems to work!

Please help.

Here is my script:

```auto
// show this video on load
showDefault();
videoBtn1.onRelease = showDefault;

function showDefault(){
    createHolder("http://www.youtube.com/v/9WsxazKKRgY&hl");
}

// Nokia video
videoBtn2.onRelease = function(){
    createHolder("http://www.youtube.com/v/LrroJTM21bs&hl");
}

// Video diary
videoBtn3.onRelease = function(){
    createHolder("http://www.youtube.com/v/v71BSTlq6bk&hl");
}

// Video holder loaded dynamically
function createHolder(videoURL:String) {
    // Create clip to hold video
    this.createEmptyMovieClip("video_mc",10000);
    // Position video
    this.video_mc._x = 25;
    this.video_mc._y = -40;
    // load videoURL into this clip
    this.video_mc.loadMovie(videoURL);
}

```

Many thanks!

Dan
