A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Error 1120: Access of undefined property air

Threaded View

  1. #1
    Member
    Join Date
    Nov 2007
    Posts
    83

    Error 1120 (save file)

    I'm new with Air and I've found following code on the net:

    code:
    var file = air.File.applicationStorageDirectory.resolvePath("  test.txt");
    var str = "Hello.";
    file.addEventListener(air.Event.COMPLETE, fileSaved);
    file.save(str);
    function fileSaved(event)
    {
    air.trace("Done.");
    }





    But I get following errors:

    Code:
    1120: Access of undefined property air.    air.trace("Done."); 
    
    1120: Access of undefined property air.    var file = air.File.applicationStorageDirectory.resolvePath("test.txt"); 
    
    1120: Access of undefined property air.    file.addEventListener(air.Event.COMPLETE, fileSaved);
    I'm using Flash CS4. I also tried publishing but it didn't work. Can anyone help me?
    Last edited by onurcan1977; 09-15-2009 at 06:12 PM. Reason: title has been changed

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center