View Full Version : can't unload MediaDisplay in loaded swf

06-09-2005, 04:39 PM

I have a slideshow using screens being cued by an flv (audio only) loaded using a MediaDisplay component.

This slideshow swf is loaded on a button release into a container movie using ....

_parent.content_mc.createEmptyMovieClip("slideshow", 10);

I then have another button to remove the created movie ....


This removes the screen slideshow visuals, but the flv narration continues to play. Why is this? I would have expected that it would be removed along with the swf that contained it. Also, if I try to just stop the audio then play again when I restart the slideshow, this doesn't work.

So my question is .... how can I stop the flv playing when I remove it's parent movie (ie *completely* unload slideshow.swf) so that slideshow.swf is initialised and ready to be loaded again? Or supposing I keep the slideshow in memory and just make it invisible, how would I reset it in this case?


06-10-2005, 06:44 AM
Got it. In case anybody else is looking, adding this to the screens slideshow did the trick ....

this.onUnload = function () {
narration.setMedia("", "FLV");


11-09-2005, 12:58 PM
can you explain this further? i am having the same issue

11-10-2005, 06:26 AM
I just added the onUnload code to I think it was the first frame of the swf containing the slideshow. When the slideshow is unloaded, narration.setMedia("", "FLV"); sends an empty reference to the audio flv and at the same time empties it of the previous audio flv.


11-11-2005, 08:47 AM
I had figured it out already.