Why?

While working on a project today, I was loading in some data via flash remoting from a remote server. thats fine, everythign works smoothly. Try to load in a jpg from the remote server, I get:

bq. *** Security Sandbox Violation ***
SecurityDomain ‘http://www.myserver.com/images/1.jpg’ tried to access incompatible context ‘file:///C|/wamp/www/website/myfile.swf’

Yeah baby!! Flash security restrictions in the authoring environment. God, I feel so secure.

The solution? Set allowDomain of the security object to the domain you want to load the swf/jpg from:

bc[as]. System.security.allowDomain(“http://www.myserver.com”);

Its a small little step, I know, but it’s one little step I’d like to not deal with while im developing, that I am just going to have to take time out and remove later.