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

206

Likes

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

Adobe Community Professional , 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);

Likes

Translate

Translate
Adobe Community Professional ,
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);

Likes

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