开发者

Problem occurring in __flash__addCallback

开发者 https://www.devze.com 2023-02-07 00:09 出处:网络
I am getting the following error when running an application in debug mode using Flash Builder: Object does not support this property

I am getting the following error when running an application in debug mode using Flash Builder:

Object does not support this property or method

(Note that this error message is coming from the browser.)

Here is th开发者_如何学JAVAe code where it is occurring:

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

I have no idea where this code is located (except that it's not my code).

Anyone know what's going wrong here?


I had the same problem. The cause was in my flash we were adding "stop" as a callback to the ExternalInterface. Changing this to stopMe or whatever works for you, corrected the issue.

It is my best guess and from what i've read on other threads that IE8 and some versions of FireFox really don't like you using certain words for callbacks. Its like its treating them as reserved words and blocking your use of them.

The only way around this is to not use those words. I haven't seen a specific list, but the following have been mentioned:

  • play
  • stop
  • pause
  • length

References drupal.org/node/746044 digitarald.de/forums/topic.php?id=315


What version of flash builder are you using? Here are some debug-related instructions for flash builder 4. Haven't tried this though and not sure if this will work in the context of the problem you are seeing.

http://help.adobe.com/en_US/flashbuilder/using/WS6f97d7caa66ef6eb1e63e3d11b6c4d0d21-7f07.html

If that doesn't help (perhaps because the error is coming from the browser) you might be able to use a script debugger for IE such as you can with Visual Studio or via a 3rd party add-on (google debugbar for IE), etc. Again, not sure if that will help in a flash context, though. Firebug has support and/or extensions for tracing flash but not sure what is available for flash debugging in IE, if the above link doesn't help.

Note that I believe there is a free version of Visual Studio now, but it's still a pain that you have to install it just to debug client-side scripts in IE, as opposed to using an easy to install Add-on in firefox like firebug - when possible.


This is not a solution, but some info on the __flash__addCallback function. As I understand it, it is one of a bunch of JavaScript functions that the Flash Player plugin adds to the surrounding HTML page, for use in conjunction with ExternalInterface (for communication between ActionScript and JavaScript).

I haven't heard about it for a while now, but a couple of years back, there was many reports on similar errors in Internet Explorer (especially if the swf was embedded in a form element, and if SwfObject was used).

So if you are using IE and ExternalInterface, that may be something to look in to. Here is more info on __flash__addCallback and related stuff:

http://code.google.com/p/doctype/wiki/ArticleFixingFlashExternalInterface


  1. Go to tools (Alt + X) and select manage-ons
  2. Disable Shockwave flash objects


I was getting the same error, specifically with using uploadify (jquery/flash plugin). The issue in my case was an "&" character in part of the data submitted. (removing these solved the problem)

HTH

0

精彩评论

暂无评论...
验证码 换一张
取 消