
If you're using the ActionScript 3 version of SlideShowPro for Flash and are loading a published SWF containing the component inside of a parent SWF using Loader.load(), you may see errors traced to the Output panel or continue to hear audio from a video or MP3 file. The reason is that ActionScript 3's Loader.unload() method doesn't remove from memory audio / video channels, timers, or events (unlike ActionScript 2). Adobe is adding an unloadAndStop() method to the Loader class as part of Flash CS4 / Flash Player 10 to replicate the behavior of ActionScript 2, but for now you have to stop/remove these yourself.
With that, the AS3 version of SlideShowPro for Flash has a halt() method to assist with destroying applicable elements that should be called before using Loader.unload(). Here's how to implement it.
Open the FLA you use to publish SlideShowPro with, and add the following ActionScript to a keyframe:
function haltSSP():void {
my_ssp.halt();
}
If your component instance is named something other than my_ssp, edit the name to the one you are using.
Open the FLA for the parent SWF and edit your ActionScript so that it includes a call to the haltSSP() method before you call Loader.unload(). For example:
function unloadSSP():void {
var loadClip:MovieClip = MovieClip(ldr.content);
loadClip.haltSSP();
ldr.unload();
}
Let's walk through the above line by line. The first inside the unloadSSP() method casts the content we loaded as part of a Loader instance to a variable of a MovieClip type. This allows us to access the timeline of our loaded content. We then call haltSSP() inside our loaded SWF, then follow that up with the unload() method to remove the loaded content from the parent.
You should now be able to load / unload a SWF containing SlideShowPro without any leftovers being seen / heard in your parent movie.

