AS3 - External SWF file not being loaded in

I'm trying to load in an external SWF file which is being hosted on a webserver i run. If i go to http://localhost:5173/file.swf in the webbrowser the file gets downloaded. I've turned on my server logs and when running the preload.swf file in flash player, i can see a network request in my debug terminal on vscode. i'm not really sure why my external file isn't getting loaded, any suggestions?

i've left out some other functions that have no use in this current context.

public function PreLoader()
      {
         Security.allowInsecureDomain("*");
         this.loaderScreen = new LoaderScreen();
         this.loaderScreen.x = 0;
         this.loaderScreen.y = 0;
         this.myLoader = new Loader();
         addEventListener(Event.ENTER_FRAME,this.fade);
         this.loaderScreen.go_btn.visible = true;
         this.loaderScreen.back_btn.addEventListener(MouseEvent.CLICK,this.btnCheck);
         this.loaderScreen.next_btn.addEventListener(MouseEvent.CLICK,this.btnCheck);
         var myRequest:URLRequest = new URLRequest("http://localhost:5173/file.swf");
         this.myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,this.showProgress);
         var context:LoaderContext = new LoaderContext();
         context.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
         this.myLoader.load(myRequest,context);
         addChild(this.loaderScreen);
      }

I've tried consulting the flash player docs and the code seems exactly the same to what i'm doing.

Upvotes: 0

Views: 39

Answers (0)

Related Questions