Ahmed Nuaman


builder of internets ~ developer of dreams ~ tamer of Dachshunds

Security Sandbox Violation Getting You Down?

When working with Flash Player you will come across this error one time or another:

*** Security Sandbox Violation ***
SecurityDomain ‘http://s.ytimg.com/yt/swf/cps-vfl104716.swf’ tried to access incompatible context ‘http://www.youtube.com/v/fXldKmGuPqM &autoplay=0&loop=0&rel=0&showsearch=0&hd=1′

And it may not necessarily be for YouTube (as the above error is).

Now don’t fret because there are ways around this. Flash Player allows you to specifiy “safe” domains from which it shouldn’t complain about security violations. By the way, you can read up about Flash Player security settings here.

So how do we fix it? Well we use the “Security()” class. The following code basically tells Flash Player that we’re allowing SWFs from these locations to access stuff in our SWF:

Security.allowDomain( 'www.mydomain.com' );

And this will (hopefully) stop your warnings appearing.

However, most of the time, the warnings stem from Actionscript 2, and then you’ll need to put the allow domain code in your Actionscript 2 SWF, using code similar to:

System.security.allowDomain( 'www.mydomain.com' );

Where have comments gone?

Good question my old fruity. I'm now sticking any post discussions on Google+. Why? Well simply it's better. WordPress's comment system isn't very elegant and nor are ones like Disqus or Livefyre, so to save hassle I've just shipped them off to a social network, like a real boss.

Search

My social skills

Latest blog posts

  • Loading posts...

Subscribe in a reader

Latest tweets

  • Loading tweets...