2 Replies Latest reply on Dec 18, 2008 2:00 PM by whomba

    Flash Absorbing Flex's MouseEvents

      Morning all,

      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 following:

      *** Security Sandbox Violation ***
      SecurityDomain ' http://myUrl.com/work/hat.swf' tried to access incompatible context 'file:///C:/Documents and Settings/me/My Documents/Flex Builder 3/bodyBuilderTest/bin-debug/bodyBuilderTest.html'

      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.)