views:

40

answers:

2

Hi guys.

I made a website using AJAX (with jquery) for the navigation. The pages of the site are sliding and I use remove() to destroy the old page.

Every thing seems alright, but some times the browser crashes when he tries to remove the old page containing a Flash object.

I suppose this is because Flash is still executing the Flash object.

My question is simple.

How do i remove this Flash's object for my page without having the browser crashing on my face ? Is there a way to stop the Flash execution before removing the object ?

Thanks for your help.

A: 

You need to get a reference to the Flash object, let's say it has an HTML ID of 'swf' and you need to stop it doing anything before you kill it:

swf.stop();

The alternative to this is to make the Flash object load some other movie that does 'nothing':

swf.movie = "http://www.domain-does-not-exist.com/donothing.swf";
JBRWilkinson
A: 

Ok finaly I use the swf object helper to do the job :

$('.flash_content').each(function ()
{
    swfobject.removeSWF($(this).attr('id'));
});
Niklaos