2

So, I have been stuck on this problem for some time now and it has caused a lot of frustration. I have found a lot of people over the many forum pages I have scoured who share the same problem but no one who has gave a clear answer as to why is this error being thrown and how to fix it.

I am using swfObject 2.2 to embed a background video onto a page I am working on and IE7/IE8 is throwing the error: "Object doesn't support this property or method" due to line 48 character 3. Upon opening up the developer tools to see what code is causing this error, I found this:

function __flash__addCallback (instance, name) {
   instance[name] = function () {
    return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" +          __flash__argumentsToXML(arguments,0) + "</invoke>"));
   }
} 

I tried finding where I was going wrong in my code and commented out everything besides:

swfobject.embedSWF('http://localhost/flash/player.swf', 'video_player', '100%', '100%', '9.0.0'); 

This is the element swfobject is looking for:

<div id="video_player"></div>

To go a step further, I used an entirely empty .swf file to make sure the error was not being thrown by the .swf file itself.

I would really like to know if anyone has had experience with this error using swfobject and if there is something I can do to solve it.

David_S
  • 21
  • 1
  • 2
  • can you provide a link? i've never seen that error, and the code you pasted (function __flash__addCallBack) is not part of SWFObject's codebase... we don't use eval. also, the official support forum for SWFObject is https://groups.google.com/forum/#!forum/swfobject – pipwerks Jul 23 '11 at 19:55
  • Thanks for your reply. I cannot provide a link yet because the project is not going to go live for another week or so. You're right, the function: __flash__addCallback is not part of SWFObject's codebase. It is an Internal Flash method. I found a little information here: http://code.google.com/p/doctype/wiki/ArticleFixingFlashExternalInterface#Internal_Methods . There is a nicely-documented bug dealing with unloading the page (__flash__removeCallback) but not loading the page (__flash__addCallback). Thanks for posting the SWFObject's forum, I chose this first and am currently posting on there. – David_S Jul 25 '11 at 20:55
  • [Update] Using object/embed tags instead of swfobject also produces this error. ` ` – David_S Jul 27 '11 at 17:04
  • [Update] A co-worker found this blog entry which supposedly gives a fix for this error: http://www.pixelthismobile.com/blog/3/11/2009/external-interface-unspecified-error-line-49-char-5. Unfortunately, I am now using a swf with no ExternalInterface calls at all and I am still receiving the same error. – David_S Jul 27 '11 at 18:43
  • [Update] I am not using Fancy Uploader, but for those who are, this site may help those that are having the same issue I am having: http://digitarald.de/forums/topic.php?id=1826 – David_S Jul 29 '11 at 18:06

2 Answers2

6

I was having the same problem, and I found this blog entry:

Adobe Flash ExternalInterface issues with Internet Explorer

To summarize this maybe related to the play() and stop() function being reserved words. Even though you mentioned you are not using ExternalInterface calls, but have you tried renaming these methods yet?

lulalala
  • 17,572
  • 15
  • 110
  • 169
  • We tried renaming these functions to shibba and shabba to no avail. Thank you for your response though! – David_S Aug 30 '11 at 14:14
  • I just solve this yesterday by renaming, so if you don't want to give up, can you download http://dl.dropbox.com/u/18883445/so2.zip, put your swf in, rename it to test.swf, and see from localhost if there are errors in IE? If the error is at line 48 character 3, use IE Developer Tool to see the local variables (e.g. http://dl.dropbox.com/u/18883445/swf2.png). See what the instance[name] are. Good luck~ – lulalala Aug 31 '11 at 02:35
  • I apologize for not responding sooner. Here is the screenshot - http://dl.dropbox.com/u/24640289/Screen%20shot%202011-09-09%20at%204.50.54%20PM.png – David_S Sep 09 '11 at 20:52
  • No problem. It appears that your swf's outgoing interface is still using "play" as the method name. We changed it to "playMedia" in our Flash source code and recompiled a new swf file, and it worked. – lulalala Sep 13 '11 at 01:34
  • We explored that problem. The problem is, in our source file, "resume" is used instead of "play". It's like IE ActiveX is injecting the "play" function and then looking for it when it never existed in the first place...frustrating lol. – David_S Sep 14 '11 at 19:34
  • I can't talk to our Flash engineer right now, but I think IE would inject every method that is make public to it, even if they are not used. After our rename we can clear see it changed from play to playMedia. But if you have already renamed every single "play" then it may be a cacheing issue. There are times when I need to manually delete temporary files off IE. – lulalala Sep 15 '11 at 01:07
1

I'd like to add to the list of 'bad' words according to IE8.

We had to rename methods called 'zoom' and 'pan' which were causing the same issue. Other people have reported 'stop' as another bad word to use.

Luckily the fix is easier than finding the precise cause: just rename your methods.

Joe Parry
  • 241
  • 2
  • 7