Skip navigation
Currently Being Moderated

LOCAL_WITH_NETWORK sandbox and SecurityError: Error #2121: BitmapData.draw

Jan 25, 2013 1:18 PM

Tags: #bitmapdata.draw() #securityerror #2123 #2121 #localwithnetwork

We have an application we run in a localWithNetwork security sandbox.  This application loads many assets from an off-site web server.  In spite of a very permissive crossdomain.xml, swfs downloaded from site give a 2121 error when we convert them to bitmaps at runtime.


  <?xml version="1.0" ?>

  <!DOCTYPE cross-domain-policy SYSTEM "">


    <allow-access-from domain="*" />

    <site-control permitted-cross-domain-policies="all"/>




Now, I understand why this restriction with BitmapData.Draw exists in general, and from what I've read in other discussion threads the general solution is to allow less restrictive access via crossdomain.xml.  This is the most permissive I know how to make it, although the documentation on the subject is not the most concise.  Are there details I'm missing here?


For the moment we're just running this as LOCAL_TRUSTED, but this requires folks to be setup with the debug plugin which is a maintenance problem.


Thanks in advance for any guidance.




  • Currently Being Moderated
    Jan 26, 2013 9:23 PM   in reply to joe_valenzuela

    Crossdomain isn’t used in localWithNetwork because there is no “domain” for the request.


    I didn’t think you needed a debug plugin for LOCAL_TRUSTED, I thought any trust file would work.  Did you try creating an AIR app instead?  It might have different security rules.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points