IndiePaivaGame / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

calling swfobject.removeSWF(.) from SWF crashes FF2 and Safari2 #186

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a button in Flex/Flash swf, when upon clicked, call
ExternalInterface.call("remove");
2. The remove function exist at the wrapper html, when upon called, call
swfobject.removeSWF(x) where x is the id of the swf object that initiate
the call.

What is the expected output? What do you see instead?
x.swf should be removed. Works in IE7, but crashes in FF2 and Safari2.

What version of the product are you using? On what operating system?
Flex3, FF2, Safari2, WinXP.

Please provide any additional information below.

Calling swfobject.removeSWF(x) works fine as was shown in Bobby's examples.

The problem is calling it from within a swf.

An interesting discovery is, if you load the same swf in 2 tabs side by
side in FF2. removeSWF(.) works fine, but failed when there is only one tab.

Appreciate your help.

Cheers
Alex

Original issue reported on code.google.com by magnuky@gmail.com on 9 Oct 2008 at 6:50

GoogleCodeExporter commented 9 years ago
I bet it does :-b

When you remove the mechanism you are communicating with during communication 
strange
things can happen, including crashes. Just make sure that the following 
conditions
are true before you remove your SWF:
1. Your SWF has to be loaded in Internet Explorer (see issue report 124)
2. All communication should have been finished (in all browsers)

So you better not call it directly from Flash, but call the function from a
JavaScript function instead, e.g. to check the readyState in IE and maybe use a 
small
delay to execute the function to make sure that ExternalInterface has finished 
its job.

Original comment by bobbyvandersluis on 9 Oct 2008 at 9:25