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

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值