Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.

clemcrock

Programmer
Dec 17, 2006
63
US
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:

Here's the code I'm trying:

Code:
var videoURL:String = '';

function load_vid_test_1()
{
   _root.video_2_holder.removeMovieClip();
	
      System.security.allowDomain("[URL unfurl="true"]http://www.youtube.com");[/URL] 
      System.security.loadPolicyFile("[URL unfurl="true"]http://www.youtube.com/crossdomain.xml");[/URL]
   
    _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("[URL unfurl="true"]http://www.youtube.com");[/URL]
     System.security.loadPolicyFile("[URL unfurl="true"]http://www.youtube.com/crossdomain.xml");[/URL]
   
   _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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top