AIR + TextArea + local Image

Hey everyone,
I'm new in this Forum and hope that I'll find some help here.
I have the following problem:
In my AIR-Application there is a modified WYSIWYG-Editor to create HTML-Content. Everything works fine but I'm not able to display graphics in this textarea. After some research I found the following:
Adobe® Flex™ 3 Language Reference -> Textfield -> htmlText -> img-Tag
"For AIR content in the application security sandbox, AIR ignores img tags in HTML content in ActionScript TextField objects. This is to prevent possible phishing attacks".
Do you think there is still a chance to get the pictures into the textarea?
I also found a workaround for the HTML-Component, but I'm not able to transfer it to my problem. Here is the command:
browser.htmlLoader.placeLoadStringContentInApplica tionSandbox = true;
(browser is the HTML-Component)
Hopefully someone knows what to do
Thanks,
Tom

Am I right in assuming that every Flex/AIR TextField is based on a standard Actionscript TextField?
So do you have any idea how to implement something like that?
Do you think creating a TextField in AS3 instead of using the <mx:TextField /> would be helpful?
I'm not really sure about that, because in the AS class of the Flex Textfield there is nothing, which says "no img-tag". It extends the standard TextField of AS. I was hoping to override simply one of the methods but there is nothing to override in the Flex AS class of a TextField. So there must be something in the standard TextField class which causes the problems, right?
Thanks a lot for helping,
Tom

Similar Messages

  • 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

  • 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

  • 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 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

  • How can I allow a user (client) to choose a local image file (on his hard d

    How can I allow a user (client) to choose a local image file (on his hard drive) and modify it using an applet from his browser ? I am trying to develop a web page that enables the user to choose an Image file, manipulate the image using a java applet, and display the results.
    Using Java�s �JFileChooser� does not work when called from a browser, probably due to security privileges issues. On the other hand, I can choose and upload any file using a JavaScript form:
    <FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="process.asp">
    <INPUT TYPE=FILE NAME="file1"><BR>

    It seems that I can choose an image file with a Java script form and process an image with an applet. How can I choose a file AND process it locally ?
    (I do not wish to upload the file to the server using JavaScript form and then back to the client�s applet for processing since it will be a tremendous waste of resources).
    Will appreciate any solution.
    Thanks !
    ( my email is: [email protected] )

    "Using Java�s �JFileChooser� does not work when called from a browser, probably due to security privileges issues. "
    You can do this if you sign the applet...

  • IP/VC 3540 MCU: How to eliminate the local image on the local endpoints?

    FACT: When creating a multipoint call using an MCU, the local image has been sent to the local endpoint which may result a slow connection since the video packet were sent to the origin.
    QUESTIONS:
    1. How can we prevent the local image to be sent to its original endpoint?
    2. If it does happen, does it consume more bandwidth?

    - In a symmetric conference that is setup to allow for 320K video would allow for 320K in and out. It does not get divided in half to produce 160K in and out.
    - The EMP has additional features above and beyond the RMM. You can see if the EMP is registered with your MCU by going into the administrative interface of the MCU and clicking on the “Registered MPs” tab. You should see both the MCU MP and EMP that is your system is using.
    - In a continuous presence conference 5 people would need to be in a conference in order for the local image to fall off the screen. This does not really eliminate the participant from the conference; it basically masks their image from being sent since they are not one of the primary speakers. If that person does talk the will show back up in the one of the four squares.
    - The only reasoning that I could possibly give for the local image looking good on the Polycom is that it may be sending back the original image to the local party. If you were to have another unit dial into the conference how does the image look?
    - Without the Audio Transcoder card you will only be able to handle G.711 Audio. Advantages of the Audio Transcoder card are that it allows you to transcode from G.711 to the following audio codecs.
    The IP/VC 3540 audio transcoder modules for the MC03A and the MC06A provide the following features:
    = Translates to G.722 codec
    = Translates to G.723 codec
    = Translates to G.728 codec
    = Translates to G.729 codec
    = Translation for up to 30 ports simultaneously

  • Image size for LOCAL images

    Is there still a size limit for the ZMG file for local images (not network
    installations)? I have a ZMG that is 2.17g that works fine using the
    network but I get the error message "end of archive" when using a dvd with
    that same image. I found several messages from last year that indicate
    that the zmg can not be greater than 2 gig for local installations. Is
    that still true? I am going to have to span my media?
    TIA,
    Sandy

    Sandy,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • 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);

  • Flex 4 + AIR 2 + mx:Image = Security Sandbox Violation!

    Hi there!
    I've been using Flex 4 and AIR 2 for some time now and there's a bug (or is it really one) that I always get and can't understand...
    Whenever I use a <mx:Image> to load an image (JPG) on a remote server that has a valid crossdomain.xml I get some annoying warnings. Of course, these only are warnings and everything runs fine (except that) but it's a pain to debug an app that has lots of logs like that:
    *** Security Sandbox Violation ***
    SecurityDomain 'http://static-p3.fotolia.com/jpg/00/07/56/92/110_F_7569245_9hdeWKxUxFRNYuowdSDBNv0YFN9xTJ9 S.jpg' tried to access incompatible context 'app:/Main.swf'
    I've googled it and found lots of others folks/threads about this, but none of them provide a valid solution... Seems like it's specific to AIR because some answers/solutions I found work in a basic SWF, but fail in an AIR app.
    Is that a bug in Flex?
    Am I wrong about the crossdomain.xml?
    How could a JPG raise a Security Sandbox Violation?
    Tips or tricks, anyone?

    AIR has different security rules because it doesn't really have a "domain"
    to compare against crossdomain.xml.  The warnings are annoying and
    misleading and usually indicate that some code is trying to access the
    bitmap inside a try/catch block.  Usually you can ignore any warning that
    doesn't stop execution.

  • How to display local image using JSP in Struts

    I am trying to display image from my local disk (eg. file://C:/Documents%20and%20Settings/varshaaz/Desktop/DSC_6172.jpg). When I execute my JSP(http://localhost:8080/sharedgreeting/test.jsp) , Image doesn't display instead I see cross icon. Though properties of that icon shows correct file path.
    Content of my JSP is :
    <html>
    <body>
    <img src="file://C:/Documents%20and%20Settings/varshaaz/Desktop/DSC_6172.jpg"/>
    </body>
    </html>

    Store your images in a folder (I've called mine gfx) under the WebContent folder of the WAR and make a call to that folder using a relative link rather than one on your hard disk, if it is a web project.
    WebContent
    --- gfx
    --- stylesheets
    --- etc...
    --- createMeetingOrSomething.jsp
    Then the link in the above jsp will be:
    <img src="gfx/someJPEG.jpg" height="50">Illu
    Message was edited by:
    Illu

  • AIR-CAP702W local ethernet ports

    Hi all,
    The new AIR-CAP702W AP have 4 10/100/1000Base-T local Ethernet ports.
    On the data-sheet it's written "for wired devices connectivity".
    http://www.cisco.com/c/en/us/products/collateral/wireless/aironet-700-series/data_sheet_c78-728968.html
    That's very good, but how do we manage the traffic on these ports?
    Are we able to configure theses ports in access-mode with different VLAN-IDs?
    So in that case the uplink of the AP should be in trunk-mode.
    And where do we configure the ports of the AP, on the WLC?
    Or is the traffic from the devices connected into these ports encapsulated into CAPWAP tunnel, like the wireless data traffic, and is terminated into the WLC(s)?
    In that case, can we choose what port is associated to what VLAN/SSID on the WLC?
    Or something else maybe?
    Thank you for your help.
    Jerome

    The 4 x 10/100/1000BASE-T local Ethernet ports support half and full duplex mode, auto-negotiation, and MDI/MDIX Auto-Sensing. Devices you connect must support auto negotiation if you connect with another mode, say hard configured speed and so on. The port may not be enabled and depending on the version of code, for example 7.6.100.120 the initial release, the ports are not managed.
    For now, (until more control is added in the software) all the LAN ports are locally switched, are mapped to the 702W VLAN, and do not appear on the Wireless LAN Controller or AP.
    Initially, the ports are disabled and may be enabled manually via CLI.
    This was done to minimize any security risks. Here are the CLI commands to enable the ports.
    (Cisco Controller)> config ap lan <port id> <enable/disable> <AP-NAME>
    (Cisco Controller)> show ap lan <port id> <AP-NAME>
    (Cisco Controller)> show ap lan port-summary <AP-NAME>
    Hope that helps.

  • Web Content Overlay | Local images do not load

    Hi there,
    the tutorial for the Web Content Overlay says, that you have to place all images and scripts in the same file folder, as the html-file itself, when you are using a local html-page.
    example:
    index.html
    pic1.png
    pic2.jpg
    Unfortunatlly it isn`t working. Why? Any ideas? The pictures are not visible on my device or the folie preview builder.
    And yes, if I open the html in my browser (like firefox or chrome) it works well.
    It works only with pictures, which are hosted online on a server.
    Thanks for answering.
    Bart

    It finally works!
    I tried a lot, but now I know the misstake/failure/bug.
    Unfortunatlly Indesign uses a absolute Link to the local Webpage.
    example: C:/Jobs/Customers/CustomerFake/JobNo/v1/index.html
    If this URL is too long (more than 40 characters), it does not work.
    At first I thought, that my path was wrong, because I used german characters like ä or ß. But this doesn't matter. Its all about the lenght of the URL.

  • IPad Air not resizing images properly

    Just picked up and iPad Air this morning. It's acting strangely.  When I try to set a photo for wallpaper, it's not sizing it properly.  I have even tried resizing images in a photo program, but that doesn't help.  Anyone?

    Resizing in iPhoto did not work.
    See the link below for the correctly sized iPad wallpapers.
    It looks like the image is cut down from the too and bottom.
    http://www.gottabemobile.com/2013/10/24/get-mavericks-ipad-air-wallpapers-device s/

  • Local image resize and upload

    Hi guys,
    I've been checking around the net for a way to implement the following:
    user wants to upload a large image. the image is resized locally on their computer to a 60kb small image. this image is then uploaded and used.
    Is there a way to do this with flash? or what is the best method? (NB: I'm not interested in using Java)
    thanks for any info or links.
    Jeff

    Well in short, you need a second language to support that,
    e.g. PHP/ASP/CF.
    First you'll have to build a GUi in which you can upload the
    jpg, putting it to the server using php/asp/cf, then you'll need to
    make a call to that image, (importing it into your flex), then
    you'll have to set the parameters for the resizing, then you'll
    have to call a php/asp/cf script which does te resizing

Maybe you are looking for

  • AS3 load external swf problem, please help...

    Hey guys, I am really in need of an answer here. I would tremendously grateful if someone has the answer. I'll keep it simple and right to the point: 1. I have created "index.swf" in AS3. Has it's own "MainClass" class. 2. I created "holder.swf" whic

  • Audio CD burn in iTunes not working

    Has anyone had this issue? My Superdrive seems to work fine reading and burning DVDs and data CDs, but burning an audio CD leaves nothing but heavy hiss and rumble. I've tried telling the burn to burn at 4x speed, 8x speed and maximum, no difference;

  • DI Server Purchase Request DI Object

    Hi Experts,    I am working on DI Server. The Purchase request DI Object is not exposed in it. Is there any other work around to post purchase request through B!WS. I am using SAP business one 9.0 PL 6 and SQL 2008 standard edition. Regards, Gokul K.

  • When I open a new tab it always comes up with a program I do not want. How do I have it come up with a blank page?

    When will McAfee site adviser be recognized?

  • Issue with sdcard slot Acer V5-171

    Hi I have an issue with my card reader where it mounts if it is inserted on boot but if I where to remove it and replace it will not remount or if I where to insert it after boot. I get this message occurring in a loop after I remove the sd card slot