views:

1104

answers:

1

I am using YUI's Dialog control to show a Flash movie on my site in a popup.

I am creating the Flash control using SWFObject. This creates a JW Player instance for my video.

I was quite surprised to see no easy way to destroy the movie in the SWF Object FAQ. When the YUI panel destroys itself it leaves an orphaned video playing.

What is the best way to destory a SWF control that was created with SWFObject, or is there no good way and I ought to just hide it instead and call 'stop()' ?

+3  A: 

swfobject.removeSWF("myVideoPlayer");

Simon_Weaver