0 Replies Latest reply on Feb 22, 2010 2:35 PM by Hemmersfield

    Code to put away embeded youtube movie.

    Hemmersfield Level 1

      Hi,

       

      I'm currently using the following code to set up a page of youtube movies on my flash website;

       

      function containYoutube(youtubevar, depthLevel) {

           this.createEmptyMovieClip("youtubecontainer",depthLevel);

           this.youtubecontainer.loadMovie("http://www.youtube.com/v/"+youtubevar);

      }

       

      containYoutube("PXu6AKePXkQ",this.getNextHighestDepth());

       

      Works great but what I'd like to have happen is when I click a new page to visit in the flash move the loaded youtube videos are stopped/deleted/unloaded as they continue to play from the video page, even when back at the home page you can hear it, this also adds excess strain on the flow of the site causing it to crash.

       

      Can anyone out there help me by suggesting some code I can add to the navigation buttons that would instruct flash to pack away all loaded youtube movies, or even a button specific to that page.

       

      many thanks,

       

      Dan