View Full Version : Security Sandbox Violation
Dazzer
May 10th, 2007, 05:21 AM
Can someone explain to me why this is screwing up
I am loading a swf from domain 1. This swf is accessing another domain (a jpg), and I encounter this error.
I tried fiddling around with flash.system.Security but I still can't seem to get it working.
Is this something I have to change in my swf, or their swf?
eudora
May 10th, 2007, 05:41 AM
This is on Debug or testing movie?
I can test movie quite ok when loading swf or xml online, but if I go debug, it will show me this error too.
Dazzer
May 10th, 2007, 05:43 AM
really? I'll try uploading then thanks
eudora
May 10th, 2007, 05:45 AM
As it I was testing movie from my local machine loading external swfs, that works fine but i cannot debug. Would love to find out why also...
senocular
May 10th, 2007, 07:49 AM
are you just loading the JPG or are you doing other things with it like BitmapData.draw()? Does the SWF that you are using to load the other SWF interact with the other SWF w/ AS at all? Or vise versa?
eudora
May 10th, 2007, 07:52 AM
are you just loading the JPG or are you doing other things with it like BitmapData.draw()? Does the SWF that you are using to load the other SWF interact with the other SWF w/ AS at all? Or vise versa?
for my case, i am using loader class to load the url and adjusting to its attributes like x y width height thats all.. loading swfs and pictures... urlloader for xml files..
senocular
May 10th, 2007, 08:03 AM
If you're interacting with ActionScript at all, you have to use allowDomain() when loading from another domain.
ActionScript 2:
http://livedocs.adobe.com/flash/8/main/00002647.html
ActionScript 3:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/system/Security.html#allowDomain()
For Text/XML (or access bitmap/sound data using draw or getting ID3 info etc), you need a crossdomain.xml file in the domain your loading from.
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14213
Dazzer
May 10th, 2007, 08:57 AM
damn crossdomain files... - sobs -
tried making a thingie that would load a youtube flv, and play around with it using bitmapData. But wouldn't work, obviously - sobs -
vikesh
May 11th, 2007, 04:24 AM
:cubs: yeps u need to allow domain
ajcates
May 14th, 2007, 12:44 AM
can some one give me an example of allow domain being used in as3
senocular
May 14th, 2007, 12:49 AM
Security.allowDomain("example.com"); // SWFs from example.com can interact with this SWFs AS
Dazzer
May 14th, 2007, 05:05 AM
but that doesn't allow me to play with the bitmap (bitmapdata.draw for instance) since i don'th ave cross domain policy files. lol
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.