Air 3.4 breaks loading local images (Mac OS X)

Since updating to Air 3.4, my Air app no longer displays local images. Is this a known issue? If so what is the fix?
I'm using the 'mx.image' component to dynamically display an image specified by the user. The image components 'source' property is set to the specified file's 'url' property. Image is displayed as a broken image icon. Was working until the 3.4 update.
Adobe AIR version: 3.4.0.2540.
Mac OS X 10.6.8. On Windows 7 the issue does not occur.
Adobe Flash Builder 4.0.1
Flex SDK 4.1
Thanks for any info!
- Felix

Hi Chris,
thanks for the response. I'm currently making a simplified repro case.
It's hard to debug, since the problem does not occur in Flash Builder debug mode, only when publishing and running with AIR 3.4. Is there a way to make the FB debugger run using AIR 3.4, without updating Flash Builder and the Flex SDK?
- Felix

Similar Messages

  • Load local image display in air app

    I am trying to load an image from the local file system, then diplay it in my air window. I don't have any problems getting the file reference from the open file dialog, problem is that I don't know what to do then. Somebody on another forum suggested using Loader.load to open the file using file.url as the URLRequest. This hasn't worked for me at all and I can't find any place online that explains how to do this. Thanks for the help

    Try this:
    var loader:Loader;
    var file:File = new File();
    var imagesFilter:FileFilter = new FileFilter("Images", "*.jpg;*.jpeg;*.gif;*.png");
    file.browseForOpen("Open file", [imagesFilter]);
    file.addEventListener(Event.SELECT, imgSelected);
    function imgSelected(event:Event):void
        loader = new Loader();
        var urlReq:URLRequest = new URLRequest(file.url);
        loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);
        loader.load(urlReq);
    function imgLoaded(event:Event):void
        var bmp:Bitmap = new Bitmap();
        bmp = loader.content as Bitmap;
        addChild(bmp);

  • Loading local images into HTML component

    I need to intermix text and images for a project I'm working
    on, and using htmlText seems the best way to do it. However, I
    can't get it to work when the images are loaded from the local file
    system.
    It seems to work fine with remote images:
    <mx:HTML x="480" y="191" width="256" height="315">
    <mx:htmlText>
    <![CDATA[
    <p>Image: <img src='
    http://knight.fb.hive7.com/res/img/ico/x32/coin.gif'
    ></p>
    ]]>
    </mx:htmlText>
    </mx:HTML>
    But not with local images:
    <mx:HTML x="480" y="191" width="256" height="315">
    <mx:htmlText>
    <![CDATA[
    <p>Image: <img src='../assets/coin.gif'
    ></p>
    ]]>
    </mx:htmlText>
    </mx:HTML>
    Anybody have any ideas or workarounds?

    Hi,
    I tried your solution, it did not worked, it gave me following error -
    ==========
    ReferenceError: Error #1056: Cannot create property placeLoadStringContentInApplicationSandbox on mx.core.FlexHTMLLoader.
        at com.exa.view::TestView/changeEvt()[/home/sachin/workspace/newed/src/com/exa/view/TestView .mxml:70]
        at com.exa.view::TestView/__toctree_change()[/home/sachin/workspace/newed/src/com/exa/view/T estView.mxml:89]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.3.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9308]
        at mx.controls.listClasses::ListBase/mouseUpHandler()[C:\autobuild\3.3.0\frameworks\projects \framework\src\mx\controls\listClasses\ListBase.as:8989]
        at mx.controls::List/mouseUpHandler()[C:\autobuild\3.3.0\frameworks\projects\framework\src\m x\controls\List.as:2279]
        at mx.controls::Tree/mouseUpHandler()[C:\autobuild\3.3.0\frameworks\projects\framework\src\m x\controls\Tree.as:2952]
    ===========
    Here is the code, the function gets called on change event of a tree component(not shown in code here)
    ===============
    <mx:Panel width= "70%" height="100%" id="cpanel" paddingBottom="10" paddingLeft="20" paddingTop ="20">
            <mx:HTML id="htmlc" width="100%" height = "100%">
            </mx:HTML>
        </mx:Panel>
    <mx:Script>
        <![CDATA[
              public function changeEvt(event:Event):void{
                   htmlc.htmlLoader.placeLoadStringContentInApplicationSandbox = true;
                   htmlc.htmlLoader.loadString(rh.content.replace(/src="\/images/mg,'src="assets'));
        ]]>
    </mx:Script>
    ================
    It would be helpful if you give more insight on your html component.
    Adobe air -version - 1.5
    Thanks

  • Load local image file to database on web

    Read_image_file works fine in client side. but it does not work on the web, can somebody find the way to save image from image file in client PC to Oracle database (or to webserver directory) when run on web.
    Thanks
    Frank
    null

    You may find the following articles useful for the JSP/Servlet part:
    Uploading files: http://balusc.blogspot.com/2007/11/multipartfilter.html
    Downloading files: http://balusc.blogspot.com/2007/07/fileservlet.html

  • Problem in a Spark List with local images dragMoveEnabled in a AIR 2 application...

    Hey,
    I developpe an AIR 2 application which allows user to load local images in a list. My list is dragEnabled, dropEnabled and dragMoveEnabled to change the order of the images. But when I'm trying to move an itemRenderer, my application crash with a " Security SandBox Violation ".
    Please help me how to fix it.
    Thanks
    Paul

    Can you embed the assets in the data provider?
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   initialize="init();">
        <fx:Declarations>
            <s:ArrayCollection id="slideArrayCollection" />
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                [Embed("accept.png")]
                protected const Img1:Class;
                [Embed("add.png")]
                protected const Img2:Class;
                [Embed("anchor.png")]
                protected const Img3:Class;
                [Embed("application_add.png")]
                protected const Img4:Class;
                [Embed("application.png")]
                protected const Img5:Class;
                protected function init():void {
                    slideArrayCollection.addItem({label:"Accept", thumbPath:Img1});
                    slideArrayCollection.addItem({label:"Add", thumbPath:Img2});
                    slideArrayCollection.addItem({label:"Anchor", thumbPath:Img3});
                    slideArrayCollection.addItem({label:"Application Add", thumbPath:Img4});
                    slideArrayCollection.addItem({label:"Application", thumbPath:Img5});
            ]]>
        </fx:Script>
        <s:List id="thumbList" useVirtualLayout="false"
                itemRenderer="ThumbTrayListItem"
                dataProvider="{slideArrayCollection}"
                height="150" width="200">
            <s:layout>
                <s:HorizontalLayout columnWidth="150" gap="15" paddingRight="5" variableColumnWidth="false"/>
            </s:layout>
        </s:List>
    </s:Application>
    Peter

  • Local image load and edit

    Hello,
    I already spend 2 days on this problem. I want to load local
    image into AIR application, edit and save as a new image. I know
    there are some security issues, which don't allow Loader class to
    access data on different domains than SWF file, but does it affect
    AIR too and local files editing? Well, sympthoms are the same.
    Here is the code:
    //pointing to an image
    var imageFile:File =
    File.documentsDirectory.resolvePath('someimage.png');
    //new file stream
    var fileStream: FileStream = new FileStream();
    fileStream.open(imageFile, FileMode.READ);
    //reading image into bytearray and closing stream
    var imgBytes: ByteArray = new ByteArray();
    fileStream.readBytes(imgBytes);
    fileStream.close();
    //tried to use LoaderContext and some workarounds available
    in the web - none is working
    //var loaderContext: LoaderContext = new LoaderContext();
    //loaderContext.checkPolicyFile=true;
    //loaderContext.allowLoadBytesCodeExecution = true;
    //creating loader and injecting image bytes into it
    var loader:Loader = new Loader();
    loader.loadBytes( imgBytes, loaderContext );
    //trace(loader.content); // will give you null
    //creating a sprite and adding image to it
    var somesprite:Sprite = new Sprite();
    somesprite.addChild(loader);
    //creating output file
    var myFile:File =
    File.documentsDirectory.resolvePath('newimage.png');
    var myFileStream:FileStream = new FileStream();
    myFileStream.openAsync(myFile, FileMode.WRITE);
    //Here is fun part: BitmapData capture everything in sprite
    except image
    var bd:BitmapData=new BitmapData(200,200);
    bd.draw(someSprite);
    var ba:ByteArray = PNGEncoder.encode(bd);
    myFileStream.writeBytes(ba);
    myFileStream.close();
    //However image will visible in the screen
    root.addChild(someSprite);
    Maybe somebody already noticed that issue and know the
    solution? It's not very sophisticated example - it won't let you do
    even a simple image editor. I'm sure there must be some way.
    Thanks in advance

    I think, then, that your problem is that you aren't waiting
    for the image to load before trying to encode and write it to disk.
    I tried your code snippet and could write the image once I put the
    encodeing and writing bit into an event handler that fired when the
    image finished loading.

  • Loading local content using AJAX in AIR

    Hello All,
    I've got a techinical question regarding loading local html5/Css/JS files into AIR's HTMLComponent. I'm very much aware that Safari's webkit implementation can handle this effectively and AIR's Webkit Implementation boasts about having nearly the same implementation as Safari's, but there still is a sanbox violation when trying to load files locally with AIR using AJAX from the HTML component. Is there a work around for this?
    One of the original ideas behind AIR was to lower the security violations between web applications and local files to make them feel more desktop-like so it really doesnt make sense if a component used to display webpages contain such restrictions.
    Any form of help or advice would be very much appreciated

    You don't want to use FileReference in AIR for what you are
    doing. Check the documentation for the mx.controls.FileSystemTree.
    There are actually a handful of AIR-specific controls for accessing
    the file system. There isn't a "File Open" dialog per se; you can
    build your own out of the controls given. I will say that the
    controls will have the flavor of the OS (so on a Mac the controls
    will behave similarly to the way a Mac accessses and browses for
    files).

  • AIR application in Leopard and loading local files

    I have an AIR app that loads a config.xml file that is in the
    same directory as the AIR app. It only has 4 nodes that are just
    pointers to folders and/or files. Works fine on a pc that I'm
    developing on. When I install the AIR app on a mac, running
    leopard, it always fails to load the config.xml file. No matter
    what file type I try to load on the mac, it will always give me the
    IOErrorEvent #2032.
    Has anyone run into this or does anyone know of a solution?
    Thanks,

    This is exactly the same problem I am having. I'm trying to
    load a local xml file from the same directory as the application
    (using OS 10.4.11).
    I am trying it this way:
    var xmlLoader:URLLoader = new URLLoader();
    var file:File = flash.filesystem.File.applicationDirectory;
    file = file.resolvePath("my.xml");
    var xmlPath:URLRequest = new URLRequest(file.url);
    try {
    xmlLoader.load(xmlPath);
    } catch (error:Error) {
    trace("Unable to load requested document.");
    Works perfectly on Windows but I get the #2032 error on Mac.
    Has someone done this successfully with Air (and how)? ;-)

  • Error "Unable to load word breaker for locale 0. Error code 8007007e." with search service application.

    I recreate the Search service application and the default Content source stayning in the 'Recovering' status.
    The log give multiple error 'Unable to load word breaker for locale 0. Error code 8007007e.'
    The default language is English and the reference in registry for word breaker dll is naturallanguage1.dll but I found only the naturallanguage6.dll.

    Hi,
    For your issue, check your current language settings and ensure that search supports the current language.
    On the SharePoint Server open Registry Editor (Start -> type “Regedit” and hit enter). 
    Point to : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OfficeServer\14.0\Search\Setup\ContentIndexCommon\LanguageResources\Default\English
    Under the registry key for each of the languages there is a value called StemmerDLLPath and WBDLLPathOverride
    Updated the registry entry with NATURA~1.dll to NATURA~2.dll
    Point to Start -> Administrative Tools -> Services, right click on SharePoint Server Search 14 and click on Restart.
    Performed a Full Crawl and wait for the Full Crawl to complete and try searching again.
    For more detailed information, refer to the following blogs:
    http://blog.ithinksharepoint.com/2008/04/20/a-word-breaker-was-not-found-for-the-given-language-error-when-crawling-content/
    http://www.sharepoint2013.me/Blog/Post/175/Word-breakers-in-SharePoint-2013
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

  • [advance question] loading a swf in adobe Air, which loads an image with "componentloader"

    Good evening all,
    I think this is a complex issue.
    I have adobe air application which loads a SWF I made.
    Inside this SWF I have used the "component LOADER" to load
    something with "ContentPath=image.jpg" for example.
    But the swf loaded in the Adobe air works, but does not load
    the "ContentPath image"...
    (it does load and display it when it this swf is run outside
    adobe Air)
    I need it to be dynamic like this, so if eventually I Include
    it in the package it won't help much...
    I just intend to replace an image background from this loaded
    swf file!
    Thanks!
    Edit:
    At this time of the editing, I fear and realize
    something....I have been using Actionscript2 for the .SWF file,
    could it be why it does not works???
    If its problematic, is there a simple way like telling it to
    read actionscript2, rather than transforming everything??
    edit2:
    I found this on the official AIR FAQ:
    Will Flash version 8 and below SWF files run in Adobe AIR?
    Yes. However, the Adobe AIR APIs are only exposed to Flash
    content via ActionScript 3 / AVM2, and thus Flash 8 / AVM1 SWFs
    will be able to run, but they will not have direct access to the
    Adobe AIR APIs.
    source:
    source
    faq Adobe
    it seems it should works!!??
    Edit3:
    nope I confirm at least some code made in Actionscript2
    works.
    I am sure this code needed to be changed for working in
    actionscript3, so "actionscript2" code works in Adobe Air.
    The problem of not loading my image must come from something
    else!!??

    Good Morning all!
    Hilarious....
    I tried so much to think maybe Adobe Air does not like a SWF
    using actionscript2, or it does not load any "external image from a
    swf", etc...
    None of that!
    I just in FLASH in the ComponentLoader....I did put simply
    the ContentPath at "myimage.jpg"....
    Of course I had to use the absolute path like
    "c:\\myfolder\\myimage.jpg"
    Of course aswell it works now!!!

  • AIR App Crashes iOS After Loading Remote Image

    I have had this problem both with the latest official AIR SDK 3.3 (3.3.0.3670) and 3.4 release (3.4.0.2540) when doing a Standard build.  I am loading a few files one after the other from a remote server on an iPad.  After loading some xmls and swfs successfully, my app crashes and closes without any error message upon loading an image file (I've tried both png and jpg with the same result).  I have both progress and complete event listeners on the loader and the crash happens after all bytes are loaded and before the complete event triggers.  So it seems as if there is some problem with initializing/decompressing the image.  The crash log reports things along the lines of "EXC_BAD_ACCESS" and "KERN_INVALID_ADDRESS."
    This problem does not occur if the files are loaded from the application directory --- only when they are loaded from the remote server.  It is also not occuring with the preview AIR SDK 3.4 with iOS6 Support release (3.4.0.3010).  It is also not occuring on the desktop simulator (adl) or the Fast mode debug option.
    Right now all I can gather is that it is a bug with the AIR SDK that seems to be resolved in upcoming versions, however I am due to submit my app to the app store September 4th so I don't really have the time to wait!
    Please advise on how I can go about tackling this issue.
    The issue occurs with any combination of the following:
    Flash Builder 4.6
    Flex SDK 4.5.1 or 4.6
    AIR SDK 3.3 or 3.4
    iPad 1/2/3 with iOS 5.1.1

    Hi,
    Could you please consider it raising via bugbase.adobe.com and share the bug number here for reference. Also, we would request you to attach sample source files which can replicate the issue.
    -Thanks for reporting it.
    Pahup

  • Help With Loading an Image In AIR

    I need to load an image (GIF) with AIR using File and FileStream, but can't figure out how to do it. I need to load the image into a Bitmap or BitmapData object, so I can't use the loader class. Here's what I have so far:
    import flash.display.*;
    import flash.events.*;
    import flash.filesytem.*;
    import flash.net.FileFilter;
    import flash.utils.ByteArray;
    import flash.geom.Rectangle;
    var file:File = File.documentsDirectory;
    var myImage:BitmapData;
    var myFilter:FileFilter = new FileFilter("GIF Image","*.gif");
    file.addEventListener(Event.SELECT,loadImage);
    file.browseForOpen("Open",[myFilter]);
    function loadImage(e:Event):void{
    var stream:FileStream = new FileStream();
    stream.open(file,FileMode.READ);
    var bytes:ByteArray = new ByteArray();
    stream.readBytes(bytes);
    stream.close();
    //By the way, this image is a special format and will always be 160 by 160 pixels.
    myImage = new BitmapData(160,160);
    bytes.position = 0;
    myImage.setPixels(new Rectangle(0,0,160,160),bytes);
    addChild(new Bitmap(myImage));
    However, this never works. I always get this error:
    Error #2030: End of file was encountered.
    I don't quite understand why. Help would be much appreciated.

    I already know how to do that, but I specifically stated in my post that I can't use the Loader class. The reason for that is that my program is an image manipulation program, and I need to load the data into a BitmapData object. However, since I originally made my post, I have found some more information. I used trace() to find out the length of the ByteArray I was loading the data into, and then the position after trying to create the BitmapData object, like so:
    import flash.display.*;
    import flash.events.*;
    import flash.filesytem.*;
    import flash.net.FileFilter;
    import flash.utils.ByteArray;
    import flash.geom.Rectangle;
    import flash.errors.EOFError;
    var file:File = File.documentsDirectory;
    var myImage:BitmapData;
    var myFilter:FileFilter = new FileFilter("GIF Image","*.gif");
    file.addEventListener(Event.SELECT,loadImage);
    file.browseForOpen("Open",[myFilter]);
    function loadImage(e:Event):void{
         var stream:FileStream = new FileStream();
         stream.open(file,FileMode.READ);
         var bytes:ByteArray = new ByteArray();
         stream.readBytes(bytes);
         stream.close();
         trace(bytes.length); //Outputs: 4631
         //By the way, this image is a special format and will always be 160 by 160 pixels.
         myImage = new BitmapData(160,160);
         bytes.position = 0;
         try{
              myImage.setPixels(new Rectangle(0,0,160,160),bytes);
         } catch(e:EOFError){
              trace(bytes.position); //Outputs: 4628
         addChild(new Bitmap(myImage));
    As the comments show, though the ByteArray is 4631 bytes, it is only read up until byte number 4628. Then it throws an error. Any idea what's going on?

  • Image loads locally but not on Website?

    I have constructed a slide show viewer for use on a website.
    The swf loads jpeg images which are contained in the same
    directory. This works well on my local machine but when uploaded to
    a website and called up by an html file, the swf runs and shows the
    correct backgrounds but fails to load any jpegs. I assume that the
    problem is to do with the transfer of the variable 'Select_picture"
    into the loadMovie statement?
    The following loop (step variable = pic_no) works locally but
    not on website:-
    >>var Select_picture:String="Pic"+pic_no+".jpg";
    >>var Select_mc:String="mc"+pic_no;
    >>
    >>this.createEmptyMovieClip([Select_mc], depthnow++);
    >>loadMovie([Select_picture], [Select_mc]);
    In order to prove that a picture could be loaded on the
    website, I simplied the code to :
    >>loadMovie("pic1.jpg",[Select_mc]);
    and this worked.
    So, I tried to transfer the same string directly via the
    variable;-
    >>var Select_picture:String="Pic1.jpg";
    >>
    >>loadMovie([Select_picture], [Select_mc]);
    But this does not work.
    Any suggestions would be greatly appreciated.
    Regards
    Dave

    Thanks , Arunkkumar2207j and ggshow for your suggestions.
    1, The image size isn't a problem because the one I used for
    the test is only 200k. And the single test image loads very quickly
    on the website.
    2. I don't think the depth of the movie clip is a problem
    either because depthnow starts at a very large number and is
    incremented for each clip and works well for multiple clips on my
    local machine. Also when loading a single image is should not be a
    problem. Also, I think I proved that was working with the single
    image test?
    3. The htm, swf and images are in the same directory. But for
    the test, I ran the swf directly on the website (without using the
    htm file to load it)
    Please keep the suggestions coming....!
    Many thanks
    Dave

  • Hi: my mac air safari is not loading all websites since i upgraded my software.. it download only few website and crome in the mac is not responding at all.. what to do please advise ???

    Hi: my mac air safari is not loading all websites since i upgraded my software.. it download only few website and crome in the mac is not responding at all.. what to do please advise ???

    Safari Problems
    Safari - Unsupported third-party add-ons may cause Safari to unexpectedly quit or have performance issues
    Try setting up another admin user account to see if the same problem continues. The intent is to see if it is specific to one account or a system wide problem. This account can be deleted later.
    Isolating an issue by using another user account
    If the problem is still there, try booting into the Safe Mode using your normal account.  Disconnect all peripherals except those needed for the test. Shut down the computer and then power it back up after waiting 10 seconds. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. When you reboot normally, the initial reboot may be slower than normal. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application un-installer. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode
    Safe Mode - About

  • We have loaded office for mac version 2008 on a macbook air, and it prompts to make an account, but then you click to register it recognises it as 2011 version and tells you there is no need to register. we cannot get past this point? anyone else?

    we have loaded office for mac version 2008 on a macbook air, and it prompts to make an account, but then you click to register it recognises it as 2011 version and tells you there is no need to register. we cannot get past this point? anyone else?

    Yes. The whole process of registering is messed up.
    No guarantee this will work, try unistalling and reinstalling. Uninstall has to be done the Microsoft way. Go to Applications / MO 2008 / Additonal Tools / Remove Office / Remove Office.
    Then reinstall the usual way. This might work.

Maybe you are looking for

  • Validation check for Cash Payments

    Hi Gurus, I need to put validation check for cash payment only - not more than Rs. 20000/- & no check for cash receipt. Please guide me what is reqd in - PREQUISITE & CHECK. Thanks, Vikas

  • How can I convert a Flare project to RoboHelp HTML 10?

    In my company, we work in RoboHelp HTML 10. We aquired a company that uses Flare for their online help project, and now it falls to me to convert it to RoboHelp. I searched online and found the converter on the Show Me The Demo site, but the download

  • Goods Issue to increase the stock levels in a plant

    Folks, I am not a MM guy and I am trying to increase the stock levels in a plant using a Goods issue. 1.     Can I do the Goods Issues without reference to a Purchase Order? If so, how can I do this 2.     What are the relevant movement types when GI

  • Best way to image sequence like ipod silhouette ad?

    I have a two second clip of a dancer doing a move I'd like to 'convert' to a black on white animation. The original is a video of a dancer on stage so the background is not clean, but I have managed to import a still into photoshop and have succesful

  • Converting StringBuffer to double

    Hi all, The only I could find converting a StringBuffer object to a double is through converting it first to a String with toString and then parsing it with parseDouble(). Is there a way to do it without doing toString() in the middle? Thanks a bunch