ouyang789987 / swfobject

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

Using name "play" for ExternalInterface.addCallBack doesn't work for IE #454

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It causes all addCallBack methods not to work and produces following error:
"Object doesn't support this property or method"

It works fine in FF and Safari.
I have tested in virtual box running on Mac OS X with latest updates
Virtual box instance: Windows 7, IE 8

Temporary solution:
Use another name instead of "play"

Original issue reported on code.google.com by hurt...@gmail.com on 3 Apr 2010 at 11:11

GoogleCodeExporter commented 9 years ago
Also note that I'm using Adobe Flash Builder 4. Replacing swfobject with latest 
version didn't help.

Original comment by hurt...@gmail.com on 3 Apr 2010 at 11:18

GoogleCodeExporter commented 9 years ago
This is not a SWFObject bug -- "play" is a reserved word in Flash Player, just 
like
"stop". Flash Player uses these keywords as names for built-in methods. You 
need to
use a different name for your callback.

Original comment by platelu...@gmail.com on 3 Apr 2010 at 5:29

GoogleCodeExporter commented 9 years ago
Then, it should'nt work for firefox and safari also ? However it works on those 
browsers as a callback :)

Original comment by hurt...@gmail.com on 5 Apr 2010 at 7:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
If everything that works in Safari and Firefox worked in IE my life would be 
much
easier.  ;)

IE is a different beast. Flash Player has a different build for IE
(built for ActiveX), and IE treats reserved words differently than FF and 
Safari. For
example, in JavaScript if you try and use the reserved word "class", it will 
work in
FF and Safari but fail in IE:

var class = "hello, world";
alert(class);

This also occurs with properties of objects:

var obj = { class: "hey there" };
alert(obj.class);

Original comment by platelu...@gmail.com on 5 Apr 2010 at 5:03