kunalpict / swfobject

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

callbackFn is not fired when expressInstall.swf is active. #632

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. On a system where expessInstall will be triggered (has a lesser fp version), 
Use embedSWF() as follows:
swfobject.embedSWF("FlashVersionDetection.swf", "flashContent","550", 
"400","10.3", "expressInstall.swf", null, null, null, 
function(e){alert("callBack Fired.");});
2. Notice the alert window is never raised.

What is the expected output? What do you see instead?
Expected, callback function to be called if version requirement is not met.
Actual: callback is not called when expressInstall.swf is loaded.

What version of the product are you using? On what operating system?
Using: swfobject 2.2
Mac OSX Lion
Chrome, FF and Safari

Please provide any additional information below.
swfobject defines a private function property called expressInstallCallback 
that is not used anywhere.

Original issue reported on code.google.com by stransky...@gmail.com on 13 Jun 2012 at 1:52

GoogleCodeExporter commented 9 years ago
That behavior is probably by design and here's why...

Activating the express install swf seems to be an alternative to (i.e. mutually 
exclusive with) calling the callback function with success=false.

If you set the embedSWF method's "xiSwfUrlStr" parameter from 
"expressInstall.swf" to null, effectively deactivating it, then the function 
specified by the "callbackFn" parameter is called with success=false as 
expected.

Therefore, as a workaround, you could set the xiSwfUrlStr parameter to null so 
the callbackFn parameter is called, then handle the success=false condition to 
display a custom error message and/or manually activate the express install 
feature.  You could also perform a version check in that callback to ensure the 
cause of the failure was an insufficient version rather than some other reason.

Original comment by Triynk...@gmail.com on 4 Sep 2012 at 10:30