Flash Player Security Sandbox is Smothering Me…

I’m currently building a standalone app in Flash/AS2 translated to an execuatable via Screenweaver. What has really been a downer are the incredible restictions placed upon BitmapData.draw(), which is used heavily throughgout the application. The really terrible thing is that we own all of the domains the loaded images and video are originating from, but since a standalone app is not necessarily part of any domain, I cannot use the draw() method on any of the digital objects being loaded into this app. I understand that there is a way around this in ActionScript 3.0 using “LoaderContext.checkPolicyFile”, but we need a solution for AS2. The image loading I can get around with a proxy script but (as I understand it) there is no way to successfully invoke draw() on an flv streaming from a Flash Media Server.

I’m looking forward to the Apollo beta release on labs to see whether or not some of these restrictions will be lifted within that runtime. I imagine Apollo would be ideal for this app but since there is so little information out there- I can really only hope at this point.

4 thoughts on “Flash Player Security Sandbox is Smothering Me…”

  1. I ran into this this week too. I tried every allowDomain combo I could think of, thinking it was just a scripting access issue. Adobe confirmed that crossdomain.xml OUGHT to be the answer (an image wouldn’t be able to call allowDomain, so it’s treated as a data loading issue instead of a script access issue) … BUT there’s a bug. So…

    you have to either use a serverside proxy to get at the content from the loading domain (as you mentioned) or you have to put a proxy swf on the other server and have it do all of the content fetching and BitmapData manipulations. As it turns out, you CAN pass the data back into your loading swf and have it do draw() calls … but don’t try to modify the BitmapData in any way, or you’ll get blank images. (I was trying to do contrast/brightness adjustments.)

    I’m loading JPGs your mileage may vary with FLVs…

  2. I’m running into similar problems while using BitmapData.draw across domains (yes, I have a policy file) and it is driving me insane. I can actually load the bitmap, but then it just goes blank once it’s 100% loaded. Good to know I’m not the only one. If anybody has a solution with as2 post it up!

  3. Pingback: In Flagrante Delicto! » Flash Media Server 3 Announced

Leave a Comment

Your email address will not be published. Required fields are marked *