1 Reply Latest reply on Jun 19, 2008 9:50 AM by Oliver Goldman

    Using AIR for simple client side .SWF cacheing

    fgauer1
      Hi All,

      I'm thinking about using AIR to do very simple client side .swf asset cacheing for some Flash Player Apps. Here are my requirements/needs:

      1) Simple AIR app install (this one should be easy and I know is already available with AIR)
      2) Pull down various .swf movies from internet sources (ours obviously) and write them to the local application storage area that AIR provides. (I think I can do this using URLLoader etc. and using the local file system methods/classes that come standard with AIR)
      3) Given 'whatever' criteria, call up the .swf from the local hard drive if it exists and play it. Otherwise go out to the internet and grab it and play it. We will use our own database and file checking to do these checks etc.

      ...seems simple enough.

      Just a couple of questions:

      1) I haven't found any code/examples to read a local .swf and play it. Is it the same basically as loading a .swf locally in Flash? In other words can this be done using URLRequest and just looking on the local hard drive to find the file?
      2) With the security sandbox in Flash Player and AIR can I load up local .swf files and play them AND query the internet to find .swf's that are not currently local? I ask this because of the LOCAL SANDBOX and NETWORK SANDBOX available in the Flash Player currently. I need to do both (LOCAL and NETWORK), and swap between them. I am hoping that with the TRUST/SECURITY/INSTALL and SIGNING mechanisms employed by AIR, that this issue is taken care of and I can do both relatively freely :).

      We're looking at only playing local .swf's that are stored in the application's local storage area and .swf's that are provided on our websites. There is no plan to go out of this 'sandbox' so-to-speak...

      ...am I in the 'zone' with the expectations out of AIR - are my prayer's being answered with AIR?!?!? (crosses fingers)

      Thanks in advance! I'm excited at the prospect of this functionality finally being available!!!!

      FG III