How to load a FLEX application in an AIR desktop application.

I am creating an AIR desktop application (mx:WindowedApplication). I need to load another remote FLEX application (mx:Application) inside my AIR application.Is it possible ? If then ,please mention how to achieve this ..

If it is bundled with the air app, then it's as easy as using the SWFLoader class.
If it's loading from a remote host, you need to load it into your app as a ByteArray first.
More info here: http://aaronhardy.com/flex/loading-a-remote-module-into-a-local-app/
The example is for Modules, but the principal is the same I believe.

Similar Messages

  • Air desktop application: how to make a menu item bold?

    Hi, I'm using Flash CS6 to develop an AIR desktop application for OSX. I've created my menu using NativeMenu and such, but I can't find a way to make the first menu item bold, like a true OSX app. So far the little I've found on this always referred to Flex, not Flash. Any hints?
    Thank you.

    Thank you, kglad.
    I think I forgot to mention I'm building an Application Menu. The NativeMenu contains NativeMenuItems and there is no format property or method that I can see. Also, the name the menu item displays is its label property, which you can set, but it's a string, and I believe the htmlText applies to textfields, right?

  • How to allow multiple instances of air desktop application

    hi all
    Adobe air desktop application only allow single instance of
    application. How to allow multiple instances like in other desktop
    applications?.
    thanks

    Thanks a lot morgair, i will check with exe4j tool.
    Actually the problem is, thread is not waiting for second request.
    thatswhat i thought it may because of thread.
    Thanks & Regards
    Sudha

  • Change Encore Project into a adobe air desktop application with password

    Good afternoon,
    I am trying to find a a way that i can change or inport a Encore project into a adobe air desktop application so that a can password protect it. I have a training simulator built in Encore that has a large number of menus and videos that i would like to tern into a tesk top application that i can password protect. Encore out puts this as a swf file. Is there any way to do this? I have bin looking around an the web and can't seem to find any information on this kind of problem. Any help would be greatly appreciated.
    Many thanks,
    Justin

    Hi Justin,
    ok, assuming that your external SWF tries to access some hosting application context (methods/properties) you could try:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                                xmlns:s="library://ns.adobe.com/flex/spark"
                                xmlns:mx="library://ns.adobe.com/flex/mx"
                                applicationComplete="applicationCompleteHandler(event)">
         <fx:Script>
              <![CDATA[
                   import mx.controls.Alert;
                   import mx.events.FlexEvent;
                   private var loader:URLLoader = null;
                   protected function applicationCompleteHandler(event:FlexEvent):void
                        loader = new URLLoader();
                        loader.dataFormat = URLLoaderDataFormat.BINARY;
                        var url:String = "MyApplication.swf";
                        loader.load(new URLRequest(url));
                        loader.addEventListener(Event.COMPLETE, loaderCompleteHandler);
                        loader.addEventListener(IOErrorEvent.IO_ERROR, loaderErrorHandler);                   
                   protected function loaderCompleteHandler(event:Event):void
                        // allow cross-scripting in case loaded content tries to access
                        // that context properties or methods
                        var context:LoaderContext = new LoaderContext();
                        context.allowCodeImport = true;
                        swfLoader.loaderContext = context;
                        swfLoader.load(loader.data);
                        cleanup();
                   protected function loaderErrorHandler(errorEvent:IOErrorEvent):void
                        mx.controls.Alert.show(errorEvent.text, "ERROR");
                        cleanup();
                   private function cleanup():void
                        loader.removeEventListener(Event.COMPLETE, loaderCompleteHandler);
                        loader.removeEventListener(IOErrorEvent.IO_ERROR, loaderErrorHandler);
                        loader = null;
              ]]>
         </fx:Script>
         <!-- ui -->
         <s:SWFLoader width="100%" height="100%" id="swfLoader"/>
         <!-- -->
    </s:WindowedApplication>
    See that doc for some details "allowCodeImport":
    http://www.adobe.com/devnet/flashplayer/articles/fplayer10_1_air2_security_changes.html
    note: I'm not sure if that would 100% work. I don't know what Encore authored .swf really do, for that you could ask on Encore forum:
    http://forums.adobe.com/community/encore/encore_general
    regards,
    Peter

  • Re: Flash Air desktop application

    Hi there,
    I have developed a flash air desktop application with the help of a flash programmer.
    Soon I will put it online for sale. How could I avoid illegal copy from spreading around?
    I need a lot of info regading this.
    Please help me with this issue.
    Many thanks

    A possible solution is described here:
         http://nsdevaraj.wordpress.com/2009/01/20/licensing-flex-air-application/
    HTH.

  • Flash air desktop application

    Hello there,
    We developed an application.
    The window of our application cannot be maximize after it is install on our desktop.
    How could we get this fonctionnality?
    Please help.
    Many thanks

    Are you saying that it is possible to get this fonctionality (maximise
    without stretching) when using flash air desktop application?
    Yes, you can maximize a window without distorting the contents. When using Flash, the stage scale mode defaults to one of the scaling modes. For your app it sounds like you should set the scale mode to the "noScale" option.
    If yes, Do you recommend the utilization of aire for the distribution of our
    application?
    I don't know enough about your application to make any kind of recommendation, and anyway my opinion might be biased since I am an Adobe employee.
    Also could you recommend us a way for limiting the illegal distribution?
    I don't think there is a fool proof way to do it (in general DRM is a race between the publishers and the hackers). Adobe doean't provide any tools for this. Presumably, there are 3rd party tools for application DRM that you could use (but that's outside my area of expertise).
    For a homegrown approach to the problem, you could require that users of your application create a user account on your web site and download a license file in order to run the application.  This isn't perfect, because someone could hack your application to remove the check for the license, but it would prevent casual copying.

  • AIR Desktop Application for Linux running HTML5 and JS

    Hello all,
    Can I build an application with Adobe AIR coding in JS + HTML5? Once it was indeed possible and there are even tutorials on this technique:
    http://www.adobe.com/devnet/air/air_javascript.html
    If it's still possible with AIR 3.8, how can I build an existing website into a desktop application that will run in debian Linux? I'm struggling to find a resource that teaches how to actually build the application with AIR SDK. I've found how to build an application written in AS3 but not HTML + JS.
    Thanks

    Thank you, kglad.
    I think I forgot to mention I'm building an Application Menu. The NativeMenu contains NativeMenuItems and there is no format property or method that I can see. Also, the name the menu item displays is its label property, which you can set, but it's a string, and I believe the htmlText applies to textfields, right?

  • Convert Air Desktop Application to Android apk Please help!

    I developed an Air Desktop Application by using Flash Builder 4, it's a pure ActionScript 3 application. I used a few PNG image files and mp3 audio files in the application. After I build it, I got the swf file, xml file and all the image mp3 files in the bin-debug folder. If I run the swf file with all other files (png and mp3 files) in the bin-debug folder, it works great. If I run the swf standalone, the application will miss the images and sounds.
    Now I'm converting the swf to apk, and run it on android device, it will NOT show the images or Doesn't play the sounds. I was wondering if there is a way to merge the png and mp3 files into the swf when I build/compile it? Or is there some other way to convert to apk which includes all the image and audio files? Please help.

    Please see adt -package command here
    http://help.adobe.com/en_US/air/build/WSfffb011ac560372f-5d0f4f25128cc9cd0cb-7ffb.html
    in this example icons folder is packaged along with swf and app xml.
    What you can do is that specify each of the mp3 and image files one by one separated by space at the place where icons is used in examples.
    In this case you will find all mp3 and image files in same directory as your swf when you run on android.
    Make sure you use app:// urls for accessing those files

  • How to export the report in HTML format for desktop application

    Hi,
    i have wrote the JRC desktop application to export the report and i am able to export it in PDF and other formats as mentioned in "ReportExportFormat" API.
    i would like to know is there any API there which can export the report in HTML format.
    i know it would be possible with web based application of JRC, but how can i do it in desktop application?

    There's no mechanism for static HTML pages that displays the report.
    You can use the CrystalReportViewer DHTML viewer, but that's 'interactive'.
    Sincerely,
    Ted Ueda

  • Detect CD drive from Flex-AIR desktop application???

    Can we detect CD drive from  Flex-AIR destop application even though there is no CD or Blank CD inside the drive?

    AIR 2.0 supports native code integration.
    http://labs.adobe.com/technologies/air2/
    This may be useful in hooking into native CD/DVD writing capabilities.

  • How to disable auto header and footer from firefox desktop Application

    I build a Firefox desktop application for my company. i need to print some page from that application using JS window.print(). It Works Perfectly in my application. But the problem is when it printing my document it prints a header and a footer automatically. I Want to remove this. I can remove this on Firefox browser , but i cant remove this on my application. Please Somebody Help Me.
    here is my application link: https://marketplace.firefox.com/app/hmspro
    User Login : admin / Password: 123
    if you want to get into printing page navigate invoice > paid invoice > print button.
    I also tryed from about:config and disable all default header footer. but it wont worked.

    Hi saaiful,
    Thank you for posting your question. window. will print header and footer.
    Here are some solutions I found after researching your issue:
    *[http://forums.mozillazine.org/viewtopic.php?f=12&t=216810]
    *[http://stackoverflow.com/questions/8228088/remove-header-and-footer-from-window-print]
    *[http://www.dreamincode.net/forums/topic/22598-using-windowprint-without-printing-header-and-footer/]
    *take a screenshot and create a page that is printable [http://www.webdeveloper.com/forum/showthread.php?210947-Using-window-print-without-printing-header-and-footer]
    *Target to another window then print: [http://www.liferay.com/community/forums/-/message_boards/view_message/3401817]
    Hope this helps.

  • Allow AIR desktop application throw windows firewall

    Hello.
    i have created a samll AIR application that interact with other applications using p2p (stratus). the application works fine however on windows 7 the firewall blocks all incoming calls (and the applications simply does not recive them with no spceial indication from windows on the block). when i add my application to the allowed progrmas in the firewall settings everthing works fine. the problom is that i want that many users will install my application.
    how can i add the application to the allowed firewall programs (on windows 7) automatically during the applications instaltion (i created the instaltion using the "Export Relese Build" in the Flash builder).
    Thanks in advance.

    Hi John,
    Is your problem solved? I am also facing same kind issue.
    Thanks

  • How to load and use JVM form other types of applications ?

    Hello
    I have a site that runs with ASP and I would like to execute some java applications to output some of the pages.
    I there a way to execute java programs in the JVM without having to create a new process running java.exe ?
    Like using and ActiveX component or a special .dll from Sun. How does a web browser run applets ?
    I can not use .jsp directly for my pages because my client also uses some custom language (MediaBase)
    they bought that works only with ASP.
    Thank you,
    Timothy Madden,
    Romania

    Yes, or something like IPC with a service process, as Michael said.
    First I wanted to know if JNI has an option the create a shared VM, since my client's web server has some other processes running that also run the JVM. Now it looks like JNI will load the JVM in-process, although the documentation says little about this, but the InitArgs structure has no 'is_shared' member.
    But all these are complicated for some web page, difficult to invoke from a scripting language, and there is too much effort just to use some library that happens to be written in Java, which I use to export search results into an Excel workbook (the library is Apache POI). I mean I would do it, but my client will not understand the need for this effort. Than I also want some data transferred between my web script and the java application.
    So I am going to stick to java.exe and create a new process on every hit, with the standard input, output and error files redirected to some vars in my script. At least until I find out more.
    Thank you,
    Timothy Madden,
    Romania

  • How to load a text file in a Java swings application

    hi,
    I am trying to retrieve a Java code(or say any text from an existing file) and display it in a swing application.
    I am not able to do so.
    Please help me.

    public String readFile(File f){
              try {
                   BufferedReader read = new BufferedReader(new FileReader(f));
                   String line = read.readLine();
                   String total = "";
                   while(line != null){
              //          System.out.println(line);
                        total += line;
                        line = read.readLine();
                   read.close();
                   return total;
              } catch (Exception e){
                   e.printStackTrace();
              return "";
         }that will read a file into a string, i hope you can figure out the rest

  • ActionScript 3 Air Desktop Application Browse For Local Directory Popup

    Hello all,
    I am developing a desktop Air program that will include a browse button that allows the user to click, and once the user clicks the button, I am wanting a pop-up window to appear that allows the user to browse to a writable folder/directory on his computer. Once the user selects a folder in the window, I want to grab that directory location and store it. The storing part I know how to do, but how to create this pop-up window or dialog, I do not have a clue where to start.
    What's the simplest way to go about this?
    Edit:
    I see I can use this example from this site, but I don't know where to grab the directory the user selected: actionscript 3 - How to create "Browse for folder" dialog in Adobe FLEX? - Stack Overflow
    var f : File = new File;
    f.addEventListener(Event.SELECT, onFolderSelected);
    f.browseForDirectory("Choose a directory");

    This seems to be supported by AIR only.
    What gives you the impression?
    AIR-only functions are marked with a fancy AIR logo
    (like the first one in this list: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/images/sprite-index.png )
    and getData doesn`t have it, so it should work without problems in the "normal" Flash Player if you follow the recepy:
    Note for Flash Player applications: In Flash Player 10, a paste operation from the clipboard first requires a user event (such as a keyboard shortcut for the Paste command or a mouse click on the Paste command in a context menu). Clipboard.getData() will return the contents of the clipboard only if the InteractiveObject has received and is acting on a paste event. Calling Clipboard.getData() under any other circumstances will be unsuccessful.

Maybe you are looking for

  • Error in mapping or source ?

    Hello Experts, I hope you can help me with following issue ... I trying to set-up an file to idoc scenario using file content conversion but I have an issue in my mapping and I know what is missing but don't know how to fix it... My source xml is mis

  • How to find items / programs opening on start up

    My MacBook Pro seems to be little slower than expected when I either reboot or start up, could this be that I have items (or many items / programs) trying to open on start up, how or where do I find these items / programs - Thank you

  • Prin to go

    for all you people with windows 7 and avg virus control it is very easy to fix problem with print to go. Just desactivate avg temporarily when you want to use print to go.It works great but remember to turn it back on afterwards....I hope this helps.

  • Get JPG save as source folder icon ?

    I posed this in scripting but might be more suitable in this forum. Hello Everyone, I would like to use a script to set the source folder icon by selecting an image. after much searching i found this. (but it's to long of GUI process) This one worked

  • POF Serializer issue

    I have a strange issue using a POF serializer where one of the fields of the class is not populated when the object is retrieved from the cache. The class looks like: public class RegionSerializer extends AbstractPersistentEntitySerializer<RegionImpl