• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

SecurityError: Error #3226: Cannot import a SWF file when LoaderContext.allowCodeImport is false.

Community Beginner ,
Oct 13, 2020 Oct 13, 2020

Copy link to clipboard

Copied

SecurityError: Error #3226: Cannot import a SWF file when LoaderContext.allowCodeImport is false.
at flash.display::Loader/_loadBytes()
at flash.display::Loader/loadBytes()
at Function/<anonymous>()[ANDROIDCARREGARSWFDIMANICO_SWF__fla.MainTimeline::frame1:44]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

Views

444

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 13, 2020 Oct 13, 2020

you need a loadercontext currentdomain to load swfs with code when using air for mobile.

 

var ldr:Loader = new Loader();
var lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
lc.allowCodeImport = true;
ldr.load(new URLRequest("YOUR_FILE_PATH"), lc);

Votes

Translate

Translate
Community Expert ,
Oct 13, 2020 Oct 13, 2020

Copy link to clipboard

Copied

LATEST

you need a loadercontext currentdomain to load swfs with code when using air for mobile.

 

var ldr:Loader = new Loader();
var lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
lc.allowCodeImport = true;
ldr.load(new URLRequest("YOUR_FILE_PATH"), lc);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines