-
How do you unload a YouTube video?
USING FLASH 8, AS 2.0
I built a small SWF that loads a YouTube video. But, when I attempt to unload the MC that plays the video, the audio of the video continues to play. It's as if the video isn't really being unloaded.
On FRAME 1, I've got 2 MC objects: videoPlayer and buttonNext. The video plays on FRAME 1, via videoPlayer object, and when buttonNext is clicked, it should go to the next frame, unloading the video.
FRAME 1 CODE:
var videoPlayerLoader:MovieClipLoader = new MovieClipLoader();
videoPlayerLoader.loadClip("http://www.youtube.com/v/DmDjBONCXEo", videoPlayer);
buttonNext.onRelease = function () {
videoPlayerLoader.unloadClip(videoPlayer);
_root.gotoAndStop(2);
}
stop();
FRAME 2 CODE:
stop();
The YouTube video plays properly. But, when buttonNext is clicked, and the playhead advances to FRAME 2, the audio for the video continues playing. Does anyone know how to unload the YouTube video? Thank you in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|