js中调用AS莫名其妙的错误,不得使用的关键词

本文解决了一个在使用Flash Builder进行调试时出现的错误,该错误源于使用了特定的JavaScript回调名称,如“stop”。IE8及某些Firefox版本不支持这些作为回调的保留字。通过更改这些回调名称可以解决此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

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

Here is the 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 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


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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值