Air App Storage

I'm new to Air and am trying to open an xml file via a FileStream object. The xml file (site.xml) is in the same directory where the .swf gets published and I've also included it in Settings>Include Files, but this produces a file not found when I test:
var filestream:FileStream=new FileStream();
filestream.addEventListener(Event.COMPLETE, onOpen);
filestream.openAsync(new File("app-storage:/site.xml"), FileMode.READ);
private function onOpen(e:Event):void {
     xml=XML(filestream.readUTFBytes(filestream.bytesAvailable));

It should be the application directory, not the storage directory.

Similar Messages

  • Air app-storage swf network access

    I have an swf file that is saved in the app-storage
    directory, and it’s compiled with “allow network
    access”, and it reads an xml file from a webserver.
    When I load this file into an swfloader in my air app, it
    throws up the “this file is trying to connect”
    notification box.
    Even if I add the path in the security settings, it refuses
    to work.
    Is there any way to let it communicate and read the xml file?

    It should be the application directory, not the storage directory.

  • Macbook Air app storage problem

    I have a 256gb Macbook Air with OS X Mavericks 10.9.5. Everything is running fine except that when I open up my storage information it says that apps are taking up 100gb of space, however, when I go to my finder > applications > get info it says that my applications are only taking up 11gb. I don't have much space left on my hard drive so this is a bit of an issue of me and also kind of confusing. How can I have 100gb of applications taking up space on my computer when I only have 11gb worth of applications?
    I only have the default applications and Google Chrome, Skype, uTorrent, Photoshop and Lightroom installed.
    Is there any way that I can reduce the gb spent on applications without deleting anything?
    Thank you!

       Re-index Macintosh HD.
       Spotlight reindexing will take a while to finish.
       System Preferences > Spotlight > Privacy
       http://support.apple.com/kb/ht2409
       You will see a new category  “Other” in the Storage Display.
          About “Other”:
       http://support.apple.com/en-us/HT202867
       Note:
       If Macintosh HD is not shown on the Desktop,  click on an empty spot on the Desktop to activate Finder.
       Finder > Preferences > Sidebar > Devices > Hard disks
       Enable it clicking inside box beside "Hard disks" to place a checkmark.
       Best.

  • Adobe Air and SharedObject in app-storage

    Hi there,
    I'm developing an air application that loads external swf files from the app-storage folder. In my external swf file I have to store a local object, but every time I try to flush (write) my object I get an error that the SharedObject can't be flushed.
    I assume that the Sandbox don't allow this?
    I searched the whole web but I found nothing that worked for me.
    Maybe it is possible to start (or install) the air application from the app-storage folder?
    many many thanks

    Ok, I've found a solution that worked for me. Loader.loadBytes did the job for me. I know that is not recommended but in my case I take control for the external swfs.

  • Can i share a storage directoy between two air apps?

    hi there... I'm developing my thesis in Flash CS4 AIR 1.1
    I have two applications, the main application and the administrator app...
    in the administrator app I can add files to the data base... I'm using the browse for open property... to save in the database an swf file
    if the user selects the swf file from a pen drive, it will save in the database that URL f:/swf_file/example.swf
    so, the main application when it starts looking for that URL, and there is not such url as f:/swf_file/example.swf, it will have an error
    i was wondering if i can have a app-storage directory for both apps.. so that when the user selects a file it will be copyTo the shared appStorage directory
    is it possible?

    You can have the same dir for both apps' storage directory.
    But you can figure out the other app's storage dir and use it.
    Or you can just use a common directory in Documents directory to share files.

  • Using browser javascript to copy selected text from a pdf file opened in Air app.

    I have posted this question on reader forum as well, but I think it is more suited here...
    I am trying to create a note-taking application in air. I want to extract selected text from pdf file as a string object or to the clipboard.
    Obviously, all pdfs in my local storage will not be scripted to recieve postMessages and act accordingly, and that is not practical either. So, my problem is, how can I copy the selected text in the pdf file (opened as an object in htmlloader within my Air app) to clipboard or directly in another control by say clicking a button in air application? I suppose, this is possible using javascript, however, I don't know which reader methods are exposed to the wrapper htmlloader control. In short, I want to execute app.execMenuItem("Copy") command through htmlloader javascript. Any alternate solutions are also welcome.
    This is similar to passing inbuilt commands/methods/functions (of adobe reader) to pdf-reader plugin embedded in a webpage via javascript. This is possible in IE where the pdf is rendered as activex object, and hence JSObject interface of pdf document/reader is accessible to the browser javascript. I have also read that this same JSObject is accessible to VB as interface for IAC, so as the Air is Adobe's own product, I was wondering if equivalent of JSObject is accessible to htmlloader control as well.
    Thanks in advance...
    Mits

    Thank you Thom for your reply...
    from
    http://www.adobe.com/devnet/acrobat/javascript.html
    ...Through JavaScript extensions, the viewer application and its plug-ins expose much of their functionality to document authors, form designers, and plug-in developers...
    As it is explicitly mentioned, that the functionality of adobe reader are exposed for plugin development, I thought someone here might have used external javascript to execute some safe methods in adobe reader. The functionality (i.e. external javascript interface-JSObject) is already available for VB programmers to develop IAC. Further, the Acrobat SDK example called "AcroPDFinHML" shows how one can embed a pdf-reader in a html page and execute some safe methods (like gotonextpage(), zooming etc.) in IE as ActiveX plugin. I have checked it myself for adobe reader 9, and it works perfectly, so there is no security issue as such to implement the same for another browser (like in my case, the htmlloader control in flex/air app).
    I intend to create a note taking application in air, where it is very much required that I should be able to copy selected text from various pdf documents, that are open in my app, and subsequently paste/collect/save the collected notes and process them afterwords (offcourse, from the pdfs that allow me copying text). However, it is not happening for me here. As the pdfs are opened through adobe reader plugin, it does not register the copy command executed by my air app. It registers the system level copy command (by keyboard shortcut Ctrl+C), but my air app has no way to execute the system level copy command programmatically. So I am kind of stuck here...
    Thanks again for your reply. Having known what am I intend to accomplish, any other (may be alternative) solutions will be appreciated nonetheless...
    Mits

  • Viewing flash based website in HTML component of AIR APP

    Hello,  I've got an air app where I'm trying to use the Html component to load up a flash website.  Problem is that the website starts to load (I can see the preloader) and then the html component just goes blank.  I wrote the html page I'm trying to load so I went in and did some trimming of javascript stuff that I didn't really need that I thought might be causing the issue, but, no dice.  I'm also catch uncaughtScript errors from HTML, and there are none.  Anybody have any ideas?  The flash on the page that I'm loading only required flash player 8, so I'm thinking that shouldn't be an issue.  The page I'm trying to load is www.socialsaga.com/air_index.php
    Here is my little mxml file that won't properly display the site.
    <mx:Panel title="Video Storage" xmlns:mx="http://www.adobe.com/2006/mxml" enabled="true" visible="true" width="100%" height="650"> <mx:Script>      <![CDATA[           public function showDOM(ev:Event = null):void {                var indEv:Event = ev;           }                      public function uncaughtException(ev:Event = null):void {                var whatException:Event = ev;           }      ]]> </mx:Script>      <mx:HTML uncaughtScriptException="uncaughtException()" htmlDOMInitialize="showDOM()" width="100%" height="100%"  location="http://www.socialsaga.com/air_index.php" id="htmlOne"/> </mx:Panel>

    That was a waste of a couple hours.... The reason it was not redering is because I had a glow filter effect on a parent
    displayobject in the app... Really weird, cause html stuff would load, but flash would not show up.

  • How to divide and load parts of Large Adobe AIR app for Android

    Hi!
    I want to create an app for Android but it will quite large. It will be larger than the 50MB offered by Google Play Store. This means that I need to find a way and break the app and load parts of it when I need them. Imagine it like minigames inside a bigger app.
    It is not clear to me how to achieve this since every time on AIR, I can export and APK file for a mini-game let's say. Can I later download APKs and integrate them into my main app? How would this be possible? Another question that I have is: In order for a SWF to play on my app, it needs to be built by AIR for Android?
    The best case would be to download content from In-App purchases and integrate in my app.
    But these things are not so clear.
    Thanks in advance for your help and support.

    I don't know how your application is structured, but if you can split sections off into separate SWFs(plain AS3 document) then you could host those section SWFs online and require the user to download them on first run.
    You could use the FileReference object to download the SWFs, save them to the File.applicationStorageDirectory, and then display/load them up with the Loader object when needed from the app storage directory. You would possibly need to check to see if the files are present at every boot of the app though as a user could "Clear Data" or "Clear Cache" of the app in the Settings of their device and one or both of those could/would delete the downloaded files.
    FileReference - Adobe ActionScript® 3 (AS3 ) API Reference

  • Getting Open In... to work with an iOS AIR app

    Hi,
    I am making a music player for iOS.  So far, I have figured that I am supposed to:
    in the InfoAdditions section of the app manifest, add:  UIFileSharingEnabled = true, so that users can place mp3s in iTunes within the app's documents directory, which my app can then open.
    Since File.browseForOpen() doesn't work on iOS ( *sigh* ), either:
    create my own file browser, based on the file pointers I get via File.documentsDirectory.getDirectoryListing().
    OR: coherce an image browser to look for sound files ( ! ) somehow, such as:
    CameraRoll.browseForImage()
    ANE:  https://github.com/freshplanet/ANE-ImagePicker
    Distriqt's CameraRollExtended ANE: http://distriqt.com/native-extensions#camerarollextended
    Assuming I can make this work without running afoul of Apple's storage guidelines ( BTW: from what I am reading, using the documents directory to store mp3s might be a violation ), I still need to figure out one more thing:
    How do I make it so that other apps can see my air app via the little "Open in..." drop-down menu, when trying to read an mp3?  Is that even possible?  IOW, is there a way to indicate to iOS that my AIR app can read mp3s ( or other sound files )?

    You need to register what document extensions you want your app to support and let other apps know about through various additional app desciptor InfoAdditions, as discussed here:
    http://forums.adobe.com/message/4725423

  • Went to install os mavericks and got this message: MacBook Air Flash Storage Firmware Update 1.1 need. tried that and got: This update requires Mac OS X 10.7.5 or 10.8.5 or later, please advise.

    went to install os mavericks and got this message: MacBook Air Flash Storage Firmware Update 1.1 need. tried that and got: This update requires Mac OS X 10.7.5 or 10.8.5 or later, please advise.mac

    OK. Now, you say you got this alert through App Store when trying to download Mavericks or after you downloaded it and were trying to install it? Which is the correct case?
    The error you are getting may sometimes occur when the computer has already been updated, but I don't know why you would be getting this message. I can only suggest that you take it in for service to find out why this is happening.

  • Packaging and Delivering AIR Apps

    Hi Guys,
    I have an issue. I have a config file in my air application
    that I want change depending on what user it is being delivered to.
    The number of users could be extremely large, possibly in their
    hundreds so to have to change the config file again and again by
    hand is unfeasible. I had an idea to automate this process with a
    web app that will take some user information and use it to update
    the details in the config. However what I am struggling with is
    whether to compile the app, open the it up in java and change the
    config file. Or whether to adjust the config file first, than
    compile the air app.
    I know how to view and read the config files in the air app
    from a java program once the air app has been compiled, but writing
    to those files is alluding me at this time. What I know nothing
    about however, is compiling an air app with a java program.
    Has anybody else had this problem? How did you go abouts
    solving this? What are your reccomendations?
    Any help would be extremely useful.

    quote:
    Originally posted by:
    duncanhall
    It doesn't need to require any user interaction at all, as
    long as you have some logic in the app that can determine which
    "version" of the config file is needed.
    Just transparently download the file in the background on
    first run, then store it in the application storage directory. This
    requires no user interaction whatsoever, means that one single
    build can deployed with an unlimited number of pssible
    configurations and makes it easy to update the config file in the
    future.
    Oh I see where your coming from! Very Good idea, I like it a
    lot. I may actually use this implementation. Thank you for your
    suggestion.

  • Air apps with outside elements

    Hello,
    First of all i'm a newbie to air.
    my question is : is it possible to create an desktop Air apps
    with the "core components" of the apps (in my case .air file and
    swf, xml) and as the full application will use flv give the
    possibility to download those flv to folder (inside the
    installation folder) or to use them from a server online.
    The final purpose of my question is that i'd like that my
    apps could look if there's updated flv available.
    Hope that my question is clear enough bcause of my poor
    english ;)
    Thanks

    Hi,
    AIR has APIs that let you download files from the internet
    and store it on your local filesystem (though not in the
    application installation directory, but a different location: the
    application storage directory). You should be able to play those
    flv's from your AIR app.
    Using the same API's you can also download a file that lets
    your app know if there is an updated flv available.

  • HTML app-storage path iframe targeting question

    In my HTML/Javascript app, I'm displaying html content that
    lives in my app-storage area in an iframe. I assign the src to the
    iframe dynamically in javascript. This works on the mac, but when I
    view in Windows, the iframe is empty.
    Here is how I create the src path:
    var docs =
    air.File.applicationStorageDirectory.resolvePath("preview/index.html")
    var url = new air.URLRequest(docs.nativePath);
    $('previewFrame').src = url.url;
    This creates a path similar to the following:
    mac: /Users/{username}/Library/Preferences/{appID}/Local
    Store/preview/index.html
    pc: C:\Documents and Settings\{username}\Application
    Data\{appID}\Local Store\preview\index.html
    Here is the iframe setup:
    <iframe id="previewFrame" src="preview.html" sandboxRoot="
    http://localhost"
    documentRoot="file:/" allowcrossDomainxhr="true"></iframe>
    I tried changing the src path to use .url instead of .native
    path, like this
    var docs =
    air.File.applicationStorageDirectory.resolvePath("preview/index.html")
    var url = new air.URLRequest(docs.url);
    $('previewFrame').src = url.url;
    This creates the following path:
    app-storage:/preview/index.html
    But if I change my iframe documentRoot to "app-storage:/", or
    leave it as "file:/", I see nothing in the iframe, on either mac or
    PC.
    Can anyone point me to what I'm missing?
    Thanks!

    Hi gizmogwai
    Is there a way I can load the image and use the bridge to
    send it to the iframe?
    inside the iframe, I have <img src='...'> that needs to
    show the image, and the problem is that I can't find a way to point
    the src attribute to the image stored on the application storage
    directory.
    Can you give me an example of what you meant?

  • Memory increase using app-storage....

    Hi!
    I'm working on an application that stores pictures in a directory. I was using ApplicationDirectory, which I discovered is a bad practice.
    To access my pics, I used to use:
    baseDestinationDirPath = "app:/Images". My program uses about 17Mo of memory, runs fast, but will encounter security errors in the future.
    If I try to use ApplicationStorageDirectory (I copy files to applicationStorageDirectory):
    baseDestinationDirPath = "app-storage:/Images", memory cranks up to 323Mo !!! and the app runs verrrry slowly.
    What's the point???
    Please help.
    Thank you.

    Hi Peter,
    and thanks for answering. I don't exactly understand what you call "memory share". Maybe I didn't explain my problem right. Let's be more precise:
    I've written this app using Air SDK and run it under Vista64. It uses some pics, and user can add some, kind of a gallery to make it simple.
    One of my classes accesses thes pics, and performs simple operations (resizing, thumbnail generation, basic treatment,...).
    Everything was OK until I decided to use App-storage instead of App directory.(At first, I wasn't aware of the security problems raised by writing ApplicationDirectory).
    When I just change one line of code (baseDestinationDirPath = "app:/Images" to baseDestinationDirPath = "app-storage:/Images", the app starts running very slow and memory usage changes from 17Mo to 323Mo! Same problem wether I use a profiler or install and run my app.
    I just tried to run both versions under Ubuntu 11.04: same memory problem (+ I get a security-error when trying to write to app-storage...). Under Linux I can't profile it, but my app is MUCH slower...
    I really don't understand why using app-storage instead of app can alter performance so dramatically! I guess it shouldn't... I 'm trying to use different profilers to try to understand the problem, but I'm not experienced enough.
    Thanks for your help!

  • Adobe AIR app installation issue due to certificate problem on mac 10.9.5

    Im trying to upgrade and then reinstall an Adobe Air application but get the error message failing to install due to a certificate issue.
    The developer says the fix is to uninstall the app and install again but this also fails.
    Checked my machine clock - saved but that didnt work
    The adobe AIR uninstaller simply says I have the latest version? Cant seem to delete and reinstall although other adobe air apps work so I dont think this is the issue
    I have gone through the troubleshooting guide: Troubleshoot AIR installation | Mac OS but still have the issue?
    Any ideas would be great.

    I suspect your Mac OS install was an in place upgrade from an earlier version. This is something I would never even consider with a production machine.

Maybe you are looking for

  • "JPEG Options" Box Problem--Help!

    I am new to Lightroom and having a problem using the "Export Actions" function.  I am a wedding editor and I send thousands of files through the Bridge Photoshop>Image Processor every week.  Well now that I switched over to Lr, I am using the Export

  • Recover bookmarks

    I was having issues with my firefox (errors, crashes, freezing, etc) so I decided to do an uninstall then a reinstall to see if it would fix. But before doing this I had set up a firefox sync account, and i made it to sync all my bookmarks. Of course

  • Defaulting the new Indian Rupee symbol in Numbers

    In Numbers, when I choose Indian Rupee as currency in cell format, I am still getting the old Rupee symbol. When I try to change the symbol to the new one, the cell format is getting changed as text.  How do I default the new Rupee symbol in cell for

  • SAP Query: Display Selection Fields in the header page of Basic list

    Hello, I have to display the selection fields in the header page of the basic list and statistics in a SAP Query. I know the usage of short names for fields in the header page, but this doesn't work for the selection fields. How can I display the sel

  • IPhone 2G Exchange Calendar Problem

    Hello, i have a problem with my iPhone 2G 2.0 and the Microsoft Exchange 2003 communication. Everything is working fine and I have full access to everything. My problem is, that i have to accept or decline every calendar entry on my iPhone. When i ha