views:

19

answers:

2

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.

A: 

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/

Daniel
I have tried both the network only as well as local only, and so far I am still experiencing the same error. Thanks for pointing out the setting thought.
Emil
I've added my entire flash working folder to a safe zone, but that only works for your own machine, can't expect all your final users to have to do that on their machine
Daniel
A: 

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.

Emil