PDA

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


aldred
06-09-2005, 04:39 PM
Hi

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);
_parent.content_mc.slideshow.loadMovie("swf/slideshow.swf");

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

removeMovieClip(_parent.content_mc.slideshow);


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?

thanks
mark

aldred
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");
};

mark

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

aldred
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.

mark

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

Thanks.