Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7597449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:09:34+00:00 2026-05-30T22:09:34+00:00

Hii, I’m tring to load swf file to my flash application from a different

  • 0

Hii,
I’m tring to load swf file to my flash application from a different server.
When i try to load it on flash IDE (crl+enter) everything is working fine, but when i run the swf as an independent swf file or by debugging it, i’m getting this error:

SecurityError: Error #2121: Security sandbox violation: LoaderInfo.content: file:///C|/Users/something/Desktop/blablabla/myplayer.swf cannot access http://www.somedomain.com/blablabla/lalalala/abc.swf. This may be worked around by calling Security.allowDomain.
at flash.display::LoaderInfo/get content()
at wallplayer_fla::MainTimeline/swfLoaded()[wallplayer_fla.MainTimeline::frame1:216]
Cannot display source code at this location.

I have the crossdomain.xml file in the root of my server:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
    <allow-access-from domain="*" />
</cross-domain-policy>

In “myplayer.swf” I have:

Security.allowDomain("*");
Security.allowInsecureDomain("*");
...
...
var loaderContext:LoaderContext = new LoaderContext();
loaderContext.checkPolicyFile = true;
loaderContext.allowCodeImport = true;

ldr = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
ldr.load(new URLRequest(graySwfFilename), loaderContext);
...
...
var mcExt;
var ldr:Loader;
function swfLoaded(e:Event):void {
    mcExt = MovieClip(ldr.contentLoaderInfo.content);
    ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfLoaded);
    mcExt.x = 0;
    mcExt.y = 0;
    addChild(mcExt);
}

I don’t really know what to do…
Please HELP?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T22:09:35+00:00Added an answer on May 30, 2026 at 10:09 pm

    Solution: for Flex 4.x (Currently 4.6) and AS3 in Flash Builder:

        import flash.system.SecurityDomain;
        import flash.system.ApplicationDomain;
        import flash.system.LoaderContext;
        var loaderContext:LoaderContext = new LoaderContext();
        loaderContext.applicationDomain = ApplicationDomain.currentDomain;
        loaderContext.securityDomain = SecurityDomain.currentDomain; // Sets the security 
    

    context to resolve Error # 2121

    … now load your SWF with

    loader.load(new URLRequest(webServerWebURL),loaderContext);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hii, well i develop a setup.exe(bootstrapper) using GenerateBootstrapper.Bootstrapper to load my msi file after
hii....I am developing a window application how is it possible to disable special keys
Hii, I want to make my own snmp server and agent.with my own MIB
Hii, I have created a class file with a name space of name1. I
Hii I have method in C#, I have to return multiple values from that
hii i am using ajax file upload in this code <script type=text/javascript src=fileuploader.js></script> <script
Hii I was coding for an application that shows the list of running process
Hii all, I tried to test my application on the simulator and it fails.
hii... I am making a view based application in which I have tabbar controller
hii friends, My application based on RSS Feeds where i have to use database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.