SecurityError: Error # 2000: no active security context

I recently had this undefined error using LocalConnection.
This happened every time I tried to connect and send data to another swf. Doing an internet search came up with little results related to LocalConnection, and this error and answer that some people had was just ridiculous. Apparently, this error applies to loading images, and to fileReference, just not in this case. My send code works fine, even event.level returns as status, which means that another swf received the message, however, tracing in another swf callback function did not show, saying that the callback never started.

Error loading image
I nailed it again using image loading.
The answer has been updated to include a fix for this.

+5
source share
2 answers

As it turns out, the fix is ​​simple.
The connection name was too long.
I reduced the name to 30 characters and it immediately started working.
I also want to add that if there is an error in the callback function, you will get this error.

IMAGE DOWNLOAD ERROR
Well, this error reappeared on me, but this time when I uploaded the images.

// bad code
imageObj.source = partialURL1 + partialURL2 + partialURL3;

//good code
var someURL:String = partialURL1 + partialURL2 + partialURL3
imageObj.source = someURL;

, URL- , . . HTTPFox , , - , , . , , .

+2

,

someobject.misspelledVariable.toString();

- localConnection, misspelledVariable, , undefined. Variable . , ...

+1

All Articles