Skip navigation
Currently Being Moderated

File write works if testing in Flash but not if SWF is launched directly

Jan 9, 2011 8:53 AM

Hi,

 

I'm new to Air so forgive me if this is something rudimentery.  I wrote an air application in Flash, that writes to an XML file.  When testing it within flash (with in the Air debugger) everything works perfectly, but if the swf or exe is launched outside of flash the write functionality no longer functions.   Pleas ehlp me if you can.

 

Best regards,

 

 

Chris McLaughlin

 
Replies
  • Currently Being Moderated
    Jan 10, 2011 3:59 PM   in reply to Chris McLaughlin

    I'm having a very similar problem. Any calls I make to the air file api return this error:

     

    VerifyError: Error #1014: Class flash.filesystem::File could not be found.

     

    My app functions perfectly when I test in air debug, otherwise nothing works... ...

     

    Please Help!!!

     
    |
    Mark as:
  • Chris Campbell
    9,456 posts
    May 4, 2010
    Currently Being Moderated
    Jan 11, 2011 11:25 AM   in reply to Chris McLaughlin

    Hi,

    If Chris's suggestions don't work please feel free to post some code so we can take a more indepth look.

     

    Thanks,

    Chris

     
    |
    Mark as:
  • Chris Campbell
    9,456 posts
    May 4, 2010
    Currently Being Moderated
    Jan 11, 2011 3:47 PM   in reply to Chris McLaughlin

    Hi Chris,

    I'm the first to admit that I'm not fully versed in AIR sandbox security, but here's a couple of things to consider.

     

    If you embed the swf it will be loaded with the proper privledges.  You might also be able to load with an app:/ URI, or via loadBytes() + allowLoadBytesCodeExecution.

     

    Here are a couple of docs that might interest you when you have some free time

     

    Working securely with untrusted content

     

    Security Sandboxes

     

    Chris

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points