# Can't post multiple YouTube videos in an swf file

**URL:** <https://forum.kirupa.com/t/cant-post-multiple-youtube-videos-in-an-swf-file/246404>\
**Category:** Uncategorized\
**Created:** [December 10, 2007, 9:48pm UTC](https://forum.kirupa.com/t/cant-post-multiple-youtube-videos-in-an-swf-file/246404 "2007-12-10T21:48:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![clem\_c\_rock](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@clem\_c\_rock](https://forum.kirupa.com/u/clem_c_rock)\
**Post date:** [December 10, 2007, 9:48pm UTC](https://forum.kirupa.com/t/cant-post-multiple-youtube-videos-in-an-swf-file/246404/1 "2007-12-10T21:48:04Z")

</div>

Hello,  
I’m making a little gallery of Youtube videos and I can’t seem to load more than one in one .swf file.

It seems that once one is loaded - another one can’t be played even if you completely remove the container clip from the stage.

I made a quick example of the problem here: [http://reseaudesign.com/RN\_test/multiple\_youtube\_test.html;](http://reseaudesign.com/RN_test/multiple_youtube_test.html;)

Here’s the code I’m trying:

```auto

var videoURL:String = '';

function load_vid_test_1()
{
   _root.video_2_holder.removeMovieClip();
    
      System.security.allowDomain("http://www.youtube.com"); 
      System.security.loadPolicyFile("http://www.youtube.com/crossdomain.xml");
   
    _root.createEmptyMovieClip( 'video_1_holder', _root.getNextHighestDepth());
    _root.video_1_holder.createEmptyMovieClip( 'video_1', _root.getNextHighestDepth());

    _root.video_1_holder.loadMovie(_root.videoURL);
    
    _root.video_1_holder._y = 40;
    _root.video_1_holder._xscale = 50;
    _root.video_1_holder._yscale = 50;
}

function load_vid_test_2()
{
    _root.video_1_holder.removeMovieClip();
        
     System.security.allowDomain("http://www.youtube.com");
     System.security.loadPolicyFile("http://www.youtube.com/crossdomain.xml");
   
   _root.createEmptyMovieClip( 'video_2_holder', _root.getNextHighestDepth());
   _root.video_2_holder.createEmptyMovieClip( 'video_2', _root.getNextHighestDepth());

    _root.load_movie_and_stop( _root.video_2_holder.video_2, _root.videoURL, null, 'simple_load');
   
   _root.video_2_holder.loadMovie(_root.videoURL);
   
   _root.video_2_holder._y = 40;
   _root.video_2_holder._x = 250;
   _root.video_2_holder._xscale = 50;
   _root.video_2_holder._yscale = 50;
}

```

Thanks,  
Clem
