views:

226

answers:

0

I have an application which I build two versions of. One for the web and one an AIR app for the desktop (they share most of the same code). Part of the functionality of the app is to load external SWF files created by other users. Some of these SWF files load external FLV files progressively.

On the web this works fine. However, the AIR version is designed to download all external files, then run offline (without an Internet connection). It downloads the external SWF files fine and then loads them from the local harddrive.

The main problem I am running into is that once the external SWF is downloaded into the "File.applicationStorageDirectory" any external referenced FLV won't work (if the FLV path is relative then it looks for the file in the AIR app directory, or if it's an absolute URL it tries to download from the Internet but can't because we might be offline).

I'm looking for any suggestions on how I can resolve this without having to modify the external SWF's if possible.

A secondary problem is that I need to know what external FLV's are being referenced when I download the files so that I can download them to the hard-drive.

Any ideas will be greatly appreciated.