AIR application opening a file.

I am writing an AIR application.
    Below is the code I am using to load a file that is located in the same directory as my flash.fla. I hard coded the file path for testing purposes only. When I run the application in the debugger I get the error traced.
package {
          import flash.display.Sprite;
          import flash.filesystem.File;
          //import ui.FileToData;
          import flash.events.Event;
          import flash.events.IOErrorEvent;
          public class MCFlash extends Sprite {
                              var sourceFile:File;
                    public function MCFlash() {
                              sourceFile = new File("C:\Randy\flash\MCFlash\church.text");
                              //var fileToData:FileToData = new FileToData(sourceFile);
                              sourceFile.addEventListener(Event.COMPLETE, onFileLoaded);
                              sourceFile.addEventListener(IOErrorEvent.IO_ERROR, onFileLoadError);
                              sourceFile.load();
                    private function onFileLoaded(e:Event):void {
                              sourceFile.removeEventListener(Event.COMPLETE, onFileLoaded);
                              sourceFile.removeEventListener(IOErrorEvent.IO_ERROR, onFileLoadError);
                              trace("file loaded");
                    private function onFileLoadError(e:IOErrorEvent):void {
                              sourceFile.removeEventListener(Event.COMPLETE, onFileLoaded);
                              sourceFile.removeEventListener(IOErrorEvent.IO_ERROR, onFileLoadError);
                              trace(e);
the error I get is: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2038: File I/O Error." errorID=2038]

I probably mislead by putting text as the extension of the file. The file is actuelly a NBT compressed file. What I need to know is why I get an error opening the file when I hard code it. If I use a button to browse for the file I have no problem loaing it, and i do not get the error message.

Similar Messages

  • Does iPad Air 2 open PDF files in Safari?

    Does iPad Air 2 open PDF files in Safari? Having trouble doing so.

    As JimHdk stated, all iOS devices do a great job of opening standard PDFs right in Safari.  Note that it is possible for PDF authors to create non-standard PDFs in Adobe Acrobat that will NOT open in Safari but it would be unusual for those PDFs to be posted on a public web site.
    Lastly, note that by doing a tap-and-hold on a link for PDF, you can choose to open the PDF in iBooks as well.  This is very helpful if you want to retain a local copy of the PDF on the iOS device for later reference.
    What happens when you try to open the PDF in Safari?

  • Change All / Get Info issue. How to set which application  opens a file?

    Hello,
    I would like to be able to set which application opens a specific file, but cannot get the 'Change all' option in the get info to stick, or to have scvope beyond the immediate folder. For example: whenever I download an.xml file and try to open it the application it defaults to is 'Property List editor' - so I have to go into 'get info' and set the application that I want to use to open the file. Let's say - Textmate. That file will then remain set, for the length of that session anyway - but clicking 'Change all' will not mean that the next file downloaded will default to 'Textmate', or that any .xml files outside the folder will open in Textmate. I have to set them all manually, which gets to be a drag.
    I once had a little open source app. that I used to set the preferences as to which application opened a specific suffix - which worked with some, some of the time... but after a clean install I lost it - and can't remember what it was called. Anyway, it didn't entirely solve the problem, only lessened it.

    [Mac OS X: Double-Clicking a File Opens the Wrong Application|http://support.apple.com/kb/TS2291?viewlocale=en_US]
    *Changing the application used to open all files of a certain kind*
    1) In a Finder window highlight a file of the kind you want to change the application to open that kind of file.
    2) While that file is highlighted, select File > Get Info or press command (apple or propeller icon) + i to get a file information window.
    3) In the lower part of the info window there is an "open with" menu with a list of applications.
    4) If your application is already in the box then it is the default application for opening that kind of file and you don't need to do anything more. Close the get info window.
    5) If the application showing in the menu is not the one with which you wish to open the file then select a new application. If your application does not appear there then select the "other..." and track down the application (usually in the Applications folder at the main level of the computer).
    6) If you wish to change all files of this type to open with this application in future, make sure the "change all" button is selected.
    7) Close the get info window.
    I know that what I posted may have been what you have been doing, but wanted to double check.
    I don't know to what application you are referring but application/file type association is done by Launch Services. Potentially this can become corrupted. You can use Onyx (free) utility to rebuild LS, but in doing so you will lose all non-default associations.
    As with any problems, I would also make sure you have run disk utility to verify and repair your drive, and repair permissions on your computer, before doing any other actions. It's surprising what that can clear up. You can slo just try starting in Safe mode, then restarting normally and see if that helps.
    [Mac OS X: Double-Clicking a File Opens the Wrong Application|http://support.apple.com/kb/TS2291?viewlocale=en_US]
    [Mac OS X: Starting up in Safe Mode|http://docs.info.apple.com/article.html?artnum=107393]
    [What is Safe Boot, Safe Mode? (Mac OS X)|http://docs.info.apple.com/article.html?artnum=107392]
    [Safe Boot takes longer than normal startup|http://docs.info.apple.com/article.html?artnum=107394]

  • Application opens multiple files

    One of the new features in Lion is that some applications open previous used files.  For instance, when I open (double click) a numbers-file, the application opens it, but also opens previous used numbers files.
    I think this is a very annoying feature.  I hoped this could be avoided by unclicking this preference in 'system preferences' (restore windows), but even unchecked, this feature is still active.
    Any advise?

    Welcome to the iOS world of nonthinking, wherein the OS decides everything for you, whether or not that's what you want. Salient details described in http://www.apple.com/macosx/whats-new/features.html#resume
    These might help resolve the problem:
    http://hints.macworld.com/article.php?story=20110918051930924
    http://osxdaily.com/2011/08/01/turn-off-resume-per-app-in-mac-os-x-lion/
    http://restoremenot.info/

  • OLE Automation EXCEL.APPLICATION OPEN === CSV file

    Hi Gurus,
    no probs to open a XLS file via
          CREATE OBJECT grc_excel 'EXCEL.APPLICATION'.
          SET PROPERTY OF grc_excel  'VISIBLE' = 1.
          CALL METHOD OF grc_excel 'WORKBOOKS' = grc_wbook.
    Open Workbook
          CALL METHOD OF grc_wbook 'Open'
            EXPORTING #1 = gfd_filename.
    but how to deal with CSV ? They're opened not properly.
    I tried #2 = 'CSV' but no luck.
    Any Idea?
    Cheers
    carsten

    COMMA separated files are SEMICOLON separated files in German Windows systems.
    This ist set in Windows System settings for regions (enhanced).
    EXCEL considers this settings when running normally. CSV is stored with ; and will be loaded properly after.
    In OLE mode, EXCEL does not consider this regional setting and expects COMMA
    If there's no option to tell lthe open method of OLE-Excel, I must translate SEMICOLIN toCOMMA before with all risks to translate text instead of separators...
    I saw some opens with #2 as parameter for "read only" but nothing regarding "separator character" (CL_RMPS_MS_OFFICE_TOOLS~GET_BUILTIN_DOC_PROPS_FROM_FIL)
    Thanks & Cheers
    carsten

  • Applications opening previous files automatically, can I stop this?

    All of my applications have a weird quirk since I installed Lion.  Every time I start them they automatically open the last file viewed.  Is this a new feature of Lion or a glitch that hasn't been worked out yet?  And is there anyway that I can stop it because it's severely annoying.  Thanks for any input!

    It is called "Resume" and is one of the "250+ new features "of Lion.
    You can disable it in Systemsettings - General Prefs ( where you also set blue or grey as the desktop colors ).
    Below the "last used objects" you find the setting if Lion shall also remember how apps were closed and if Lion shall re-open them with where you left.
    You can also let it be default and decide on a  per App / per Usage decision for each app that makes use of these features : In the menubar when you go to "Quit (appname)" , hold down the option key - then "quit" becomes "quit and forget state" ( similar meaning, i have german osx ) .

  • Can you call external exe file from Flex Air Application like notepad.exe

    Im trying to make my Air Application open an External exe file anyone know if this can be done?

    Hi,
    If you want to share code between a flex app and AIR, you
    could isolate the common bits as a swc file and link to the swc
    from both the flex and air project.
    Also, you could have the flex mxml file and air mxml file
    load the same module (which has the same stuff as your original
    flex application) using ModuleLoader.
    Or, you could even load the swf of your flex application
    using SWFLoader in your air mxml file.
    Basically, check out creating flex libraries, modules and
    runtime loading of swfs.

  • Adobe AIR application file types

    Hello everyone,
    I dont know how to go about this but i was wondering how possible it is to create an application with its own filetype using the AIR application descriptor xml file in such a way that everytime a file is created from that Air App, it takes the icon of  the application. I kmow this is posssible beccause i have tried it. What is even cooler is the fact that everytime you click on that file, you AIR app automatically starts. But the Real Question is how do you start the App with you file loaded.
    In my case i'm writtting an app in which you can create or load an SQLLite database file with a custom file type. Its an inventory manager which you can load databases which contain inventory information u previously stored or create a new database file to store your new inventory information. How do i Click an already existing database file so that the application loads with that database...
    Anyone done something similar?

    No thanks Guys, i figured how to load those files...all i had to do was to provide an implemention for the application's invoke event. the files clicked can be accessed by the event object's argument property which is an array so if you selected a file, the native path of the file can be accessed using event.arguments[0]
    I hope this information is valuable to anyone who needs a similar functionality!

  • What application opens a .wmv file?

    I've gotten several .wmv files in my email and being new to Macs I don't know what application opens these files. I can download them successfully however I always get an error message that says Saffari cannot open these files. Help!

    .wmv is a Windows Media file.
    You can use Windows Media Player for Mac to open those.
    You might also need Stuffit Expander to extract the Windows Media Player file after it's downloaded.

  • Help I can't open raw files in lightroom

    For some reason every time I try to import files that are RAW it states my files are not there or corrupted.  I have them in a file on my computer hard drive and on an external hard drive.  I don't know what do do.  any import would be helpful

    Camera? How are you importing them (i.e., what options)? What is the exact message you are getting? What version of the product are you using?
    Can any other application open these files up?
    http://catb.org/~esr/faqs/smart-questions.html

  • How to open .ogg files while browsing with a player not firefox

    when selecting an .ogg link firefox opens the file in the current browser window. how can i associate this file type with a player of my choice instead. i have made this association in windows but no luck with firefox.
    txs

    Which application opens the file if you double-click such a file in Windows Explorer?
    If the default program is Word then Firefox should offer that application as the default.
    In the case of an attachment then it may not be likely that the file is send with the correct MIME type for a doc or docx file, but possibly a generic type like "application/octet-stream" that will make Firefox want to save the file.
    *https://support.mozilla.org/kb/change-firefox-behavior-when-open-file

  • Support system tray icon of Air application

    Hi All,
    I developed a widget with flash builder 4 and I exported all the project in AIR application. Then, I packaged AIR application in .exe file for Windows, and dmg file for MAC. My application works correctly for both of OS.
    When I launch application on OS Windows, an image on system tray (for my application a socceer ball) appears. On the other side, on OS MAC my icon appears, but after 3 or 4 seconds it disappears and it is replaced with an other icon (probably it's a default icon of mac for this kind of application?) ...
    What can I do? Thanks in advance, regards
    Gianni

    I attached files reporting images of icon on system tray. I didn't set any option on app descriptor, I used SystemTrayIcon and DockIcon APIs.
    Anyway I attach part of my application code ...
    windowComplete event of WindowedApplication is handled by function preInit () ...
                private function onWindowActivate():void
                    if (!this.windowActivateRequest)
                        this.dock();
                private function onInvoke( event:InvokeEvent ):void
                    if( event.reason == InvokeEventReason.LOGIN )
                        //do background processing...
                        trace( "Running in background..." );
                        this.windowActivateRequest = false;
                        this.dock();                   
                    else
                        trace("Running on screen");
                        this.windowActivateRequest = true;
                        if (this.stage != null)
                            this.stage.nativeWindow.activate();   
                public function dock(event:Event = null):void
                    stage.nativeWindow.visible = false;
                    var imgObj:BitmapAsset = new trayIcon() as BitmapAsset;
                    var bitmampDataTmp:BitmapData = imgObj.bitmapData;
                    var arrayTmp:Array = new Array();
                    arrayTmp.push(bitmampDataTmp);
                    NativeApplication.nativeApplication.icon.bitmaps = arrayTmp;
                public function undock(event:Event = null):void
                    this.windowActivateRequest = true;
                    stage.nativeWindow.visible = true;
                    NativeApplication.nativeApplication.icon.bitmaps = [];
                private function preInit():void
                    try
                        NativeApplication.nativeApplication.startAtLogin = true;
                    catch ( e:Error )
                        trace( "Cannot set startAtLogin:" + e.message );
                    NativeApplication.nativeApplication.addEventListener( InvokeEvent.INVOKE, onInvoke );
                    if(NativeApplication.supportsDockIcon)
                        var dockIcon:DockIcon = NativeApplication.nativeApplication.icon as DockIcon;
                        NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE,undock);
                        dockIcon.menu = createIconMenu();
                    }else{
                        if (NativeApplication.supportsSystemTrayIcon){
                            var sysTrayIcon:SystemTrayIcon = NativeApplication.nativeApplication.icon as SystemTrayIcon;
                            sysTrayIcon.tooltip = "Stopwatch";
                            sysTrayIcon.addEventListener(MouseEvent.CLICK,undock);
                            sysTrayIcon.menu = createIconMenu();   
                private function createIconMenu():NativeMenu
                    var iconMenu:NativeMenu = new NativeMenu();
                    var exitCommand: NativeMenuItem = iconMenu.addItem(new NativeMenuItem("Esci"));
                    exitCommand.addEventListener(Event.SELECT, chiudi);
                    return iconMenu;
    trayIcon is name of .png which represent ball image ...  
    I try to summarize ...In MAC OS DockIcon isn' t represented by ball image ...In Windows OS everything works.
    I'm sorry for disturbing you but I hope that everything is clear.
    Thanks

  • Since SL install, can't open .mpkg files

    I just installed Snow Leopard. I'd like to look at the Optional Installs, but when I double-click on the .mpkg file, Finder asks me what application I want to open it with.
    So, what application opens .mpkg files?

    theosib wrote:
    I just installed Snow Leopard. I'd like to look at the Optional Installs, but when I double-click on the .mpkg file, Finder asks me what application I want to open it with.
    So, what application opens .mpkg files?
    /System/Library/CoreServices/Installer.app
    Try a control-click and select "Open With" -> "Other...". Then navigate to /System/Library/CoreServices and select Installer.

  • How to open and show a word, excel, ppt file in Adobe AIR application?

    Dear All,
    I have a requirement to open a MS- word/ Excel file in the AIR application.
    On click of a brows button a file reference box opens...on any file
    selection...it should open in the application itself...
    so plz let me know the solutions u have...

    Here is your basic issue: setting a classpath (and presumably compiling and executing a program) is one of the most basic, fundamental concepts in Java. I would advise you to follow JVerd and Annie's links and get started on a tutorial. Try writing a simple HelloWorld application before delving into POI. When you are more comfortable writing and compiling programs, and post a specific question, it will be much easier to help you.
    - Saish

  • To open a Excel and Doc file inside the AIR application

    How to open a Excel and Doc file inside the AIR application.  I have opened the PDF file inside the AIR application.  But i got stuck in opening the Exce and Doc file.  Please help me in this issue.

    AIR does not support this inherently. However, you could write code to parse these file formats. For example, the following is an ActionScript 3.0 library for reading and writing Excel files:
    http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=1375018

Maybe you are looking for

  • Help me in selection screen

    Hi,     I have req callled ,I have two parameters statements. If I givr wrong entry in first parameter statement it has to show error messag and other option should go for display mode. With warm regards, khadar.

  • How can I copy a YouTube clip into iMovie?

    How can I copy a clip from YouTube into iMovie?

  • ITunes freezes when I connect my iPhone... Anyone else with this problem?

    I just updated to the latest version of iTunes and I tried to connect my iPhone 4 this evening and it just kept freezing. It wouldn't do anything.. As soon as I disconnected the phone from the computer the iPhone screen popped up like it normally doe

  • Feedback: nice but no so..

    hallo,   i recently bought a Playbook and I updated the device to the latest OS. I would like to share my impression and feedback.  First the hardware looks pretty good: right size, right handling, the OS ist really smooth. The OS is really good as w

  • Backup server on an ACE

    When creating a backup server on an ACE running A5(2.1), we're using the probe as the trigger. Once the primary real server has failed to the backup,  will it fail back to the primary server when the probe deems the primary server available? It's jus