New to the boards and I figure what better way to introduce
myself than posting a question? :P
Right now I am loading a series of SWFs and Images, and the
goal is for the user to be able to click image / swf and drag it
around (I know, its super complicated). However when running
locally this does not seem to work. Currently I have the following
block of code (first block). When I have mouse down i get the
*** Security Sandbox Violation ***
tried to access incompatible context 'file:///C:/Documents and
Settings/me/My Documents/Flex Builder
Now in hat.swf I have:
flash.system.Security.allowDomain("*"); however this does not seem
to help at all. This is the same if i use SWFLoader, Image, or a
regular Loader and add it to a canvas.
Next I have tried wrapping that image in an additional canvas
and putting the mouse down / up events on there. This worked
slightly better (but not much). I would click the actual SWF and
get the same output in my console, but when i clicked the
'background' of the SWF (while still in the canvas) this works.
Any help with this would be greatly appreciated. Thank you
for your time and help in advanced.
(oh, and this only happens when I load a SWF, if I load a jpg
/ gif / etc.. it works fine.)
So this is not the fix that I wanted or the one I was looking
for, however it does work. I have a custom 'complete' event on the
image so i know when the image is actually loaded. There, I inject
this bit of code seen below. It's pretty self explanatory, however
I will explain it anyways. If the image is a SWF add a listener to
its content (the actual MC) else, it will work because its a JPG /
GIF / etc.