开发者

Can't use Flash ExternalInterface in Action Script 3.0 on localhost

开发者 https://www.devze.com 2023-01-08 19:59 出处:网络
I have a flash file which captures 开发者_开发百科an image from a webcam and sends it to the server. This file works fine under ActionScript 2.0 but under 3.0 I get an Unspecified Error and the debugg

I have a flash file which captures 开发者_开发百科an image from a webcam and sends it to the server. This file works fine under ActionScript 2.0 but under 3.0 I get an Unspecified Error and the debugger crashes on the return eval in :

function __flash__addCallback(instance, name) {
  instance[name] = function () { 
    return eval(instance.CallFunction("" + __flash__argumentsToXML(arguments,0) + ""));
  }
}

I've tried adding localhost to the list of trusted sites in the flash security manager http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html

I've also tried playing with the allowScriptAccess and allowNetworking settings in the object tag.


I've solved my own problem. Turns out that it was not related to the sandboxing but was an error in the code. Any error that occurs in the flash file will turn up in the Javascript debugger as an unspecified error.


might be a silly question, but did you check the publish settings? I'm asking because you didn't mention it, and you need to set it to local (or network access if you want network access) before the trusted zones take effect.

Also you might need to set the folder to a trusted zone as well

there are quite a few security changes between as2 and as3 so it's good ta have a read ... https://www.adobe.com/ap/products/flashplayer/articles/localcontent/

0

精彩评论

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