Avoiding sandbox messages

You might notice that, inconsistently, you see security sandbox errors when you create things in Flash. To clarify ‘odd time’ — if I load a JPEG into a Loader I don’t see the message, but if I load a JPEG into the ScrollPane I might see the message every 4/5 tests. Note: You only see the message in the Output panel (ie: in the test environment – when you Ctrl+Enter) – the SWF works in the test environment despite the message, and there is no message outside of the test environment.

I didn’t pay it much attention, but did run across this blog post recently:


Therefore, if I load a JPEG from flash-mx.com and want to avoid seeing the message, I can add the following to the code:


Then you won’t see anything in the Output panel.

So yes, pre-blogged but worthwhile nonetheless.