Highlighted

Load external SWF that loads other external SWFs

Explorer ,
Jan 23, 2015

Copy link to clipboard

Copied

I need to load an existing SWF project into my AIR application. The project consists of a primary SWF that loads other SWFs.

First, the tl;dr version: I have an AIR app that needs to load SWF A from a different directory, but SWF A needs to load SWF B (from the same directory). If I load SWF A from my application, it does not load SWF B. I don't get any errors.

A longer but still simplified description of the problem:

I have an external project consisting of Main.swf and Content.swf in an external directory.  Normally, when Main.swf is launched, it loads additional content from Content.swf. I need to make an AIR app that can load and play Main.swf correctly.

I am loading Main.swf as a ByteArray, using a FileStream and a Loader. I can successfully load and display Main.swf, but all of the content from Content.swf fails to load. I don't get any security errors or other indications of what the problem is. However, if I put Main.swf and Content.swf in the bin/ folder for my AIR app, Main.swf does load correctly with all of the content from Content.swf showing.

Unfortunately the application needs to be able to load external files, not files embedded in the application itself. I am guessing that either a security or pathing error is preventing Main.swf from loading the content when Main.swf is outside of the root directory for my AIR application (but again, I'm not seeing any security errors). Unfortunately I don't have the source for the external SWF files. Is there any way to load Main.swf such that it is able to load Content.swf?

I hope my description of the problem makes sense. A thank you in advance for any advice given.

TOPICS
Development

Views

111

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

Load external SWF that loads other external SWFs

Explorer ,
Jan 23, 2015

Copy link to clipboard

Copied

I need to load an existing SWF project into my AIR application. The project consists of a primary SWF that loads other SWFs.

First, the tl;dr version: I have an AIR app that needs to load SWF A from a different directory, but SWF A needs to load SWF B (from the same directory). If I load SWF A from my application, it does not load SWF B. I don't get any errors.

A longer but still simplified description of the problem:

I have an external project consisting of Main.swf and Content.swf in an external directory.  Normally, when Main.swf is launched, it loads additional content from Content.swf. I need to make an AIR app that can load and play Main.swf correctly.

I am loading Main.swf as a ByteArray, using a FileStream and a Loader. I can successfully load and display Main.swf, but all of the content from Content.swf fails to load. I don't get any security errors or other indications of what the problem is. However, if I put Main.swf and Content.swf in the bin/ folder for my AIR app, Main.swf does load correctly with all of the content from Content.swf showing.

Unfortunately the application needs to be able to load external files, not files embedded in the application itself. I am guessing that either a security or pathing error is preventing Main.swf from loading the content when Main.swf is outside of the root directory for my AIR application (but again, I'm not seeing any security errors). Unfortunately I don't have the source for the external SWF files. Is there any way to load Main.swf such that it is able to load Content.swf?

I hope my description of the problem makes sense. A thank you in advance for any advice given.

TOPICS
Development

Views

112

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
Jan 23, 2015 0

Have something to add?

Join the conversation