[AIR + AS3] How to restart native desktop AIR application?

Hello,
I develop AS3+Air application on desktop. I have problem with restart feature. Is it possible to do it without making externall app which only load a main swf file?
I found only one code solution.
    var mgr:ProductManager = new ProductManager("airappinstaller");
                              SmartLogManager.info(NativeApplication.nativeApplication.applicationID);
                              SmartLogManager.info(NativeApplication.nativeApplication.publisherID);
                  mgr.launch(NativeApplication.nativeApplication.applicationID + " " + NativeApplication.nativeApplication.publisherID);
                              NativeApplication.nativeApplication.exit();
but this only close app, no restart.

document.location.href='';//resets the program
It seems to be the only quick solution to restart the program.
It comes with one major downside though.... It can cause memory leaks each time you call that function.

Similar Messages

  • How to automate Remote Desktop Mobile application wpctsc.exe?

     I'm looking for a way to automate the Remote Desktop Mobile application wpctsc.exe.  Specifically, when wpctsc.exe launches, a screen is first displayed showing Status, Computer, User name, Password, Domain, and other options.  I would like it instead to connect (with these defaults) directly without showing this screen.  Is there a command line option or registry setting I can take advantage of?  If not, can another program such as CETSC be run on WM6 and automated in a similar manner to get the same result?  Is there a way to make use of an rdp file?

    I can't answer your question directly, but I've had similar interests.
    I found that the last connection made is stored in \Windows\Default.rdp.
    The executable seems to ignore any parameters given, so you can't tell it to use another file, but you can, of course, replace the contents of the default.rdp file.
    I'm planning to wrap wptsc with a Mortscripts that can preserve all the last connections.  When the script is launched, it should display a menu of the most recent connections, replace default.rdp with the selected connection, launch wptsc, and update the MRU list upon exit.
    Mortscript should also be able to automate the first screen - it can fake keypresses and clicks, detect windows, etc.

  • How to edit 'native' start-up applications.

    Hi,
    I have installed Cisco Clean Acess Agent, and can't uninstall it.
    It appears on the top menu, and I can quit it. However, I can't find
    a place where the application is. It is not anywhere in preferences or
    applications folder. Spotlight doesn't find any appropriate
    matches for 'clean', 'access' or 'cisco'.
    I tried holding control and moving it, just to get rid of it from the
    menu bar, however, nothing happens (contrary to other, more native menu
    elements).
    So I have two questions:
    1. How do I find this application? Where can it be?
    2. How do I remove it from the 'autostart'?
    It's not in the login preferences, because it integrates more tightly into OS.
    Thanks!

    Well... I downloaded it from the Wellesley College local network (which forces all visitors to use it). I can't get to this webpage until I actually go to Wellesley.
    However, thanks for idea! Cisco indeed has some uninstall suggestions.
    http://www.cisco.com/en/US/docs/security/nac/appliance/configurationguide/413/cam/magntd.html#wp1276391

  • How to restart Air application

    I have the following questions any help would be appreciated.
    1. Is there a way to restart Air application
    2. How to get application directory path
    3. How to get application executeable name i.e.
    (myFlexApp.exe for windows)
    Thanks in advance.

    I know air application has .air application, but after
    installing the air application its extension is no longer ".air"
    for windows its extension become ".exe" for mac and linux it is
    some thing else.
    secondly global Object Application has limited functionality
    it doesn't provide the path of directory where application is
    installed and complete name of application with extension, someone
    can change the executable file name manually in installed
    directory, in that case Application.application.name + ".exe"
    doesn't work....

  • How to restart imessage on mac book air?

    My message keeps stuffing up so im wondering how to restart it.

    Please describe the problem, rather than your conclusion as to how it should be solved.

  • FLV Playback and Seekbar on different native windows in one Air application

    Hello Everyone.  I'm trying to make a simple video playback AIR application that utilizes the initial native window to house a transport control with a seekbar on it.  Once the application launches, it creates a second (new) window on my second screen and places a FLVPlayback instance on that new window.  Everything works just like it want it to except for one thing.  When the seekbar and FLVplayback instance are not located on the same window stage, the seekbar handle sticks to the mouse when trying to scrub through the video.
    I've added both the transport control and the FLVPlayback instance to the original native window as children and I have also added both of them to the new window as children and everything works just fine.  It's only when they are separated and located on different stages that the seekbar acts up.  When they are on the same stage, I can click on a point on the seekbar and the video jumps to that spot and continues to play and I can also scrub the seekbar, the video updates as I scrub, and when I release the mouse, the seekbar handle stays where I released the mouse.  When they on separate stages, the seekbar handle continues to follow the mouse movement without releasing it.  The video updates as the seekbar handle is moved due to it sticking to the mouse, but if I release the mouse, the handle is still moving with the mouse and the video is still being scrubbed.  Like I said, everything works great except for this and I have reached my limit with time spent on this issue.  Does anyone have any insight into this?
    Here's my code for the project.  This is my first AIR application, so I am coding it as I am learning, please be kind.
    import fl.video.*;
    import flash.display.*;
    import flash.desktop.*;
    import flash.events.*;
    import fl.video.MetadataEvent;
    import flash.geom.*;
    import flash.ui.Mouse;
    import flash.text.*;
    GLOBAL SETUP
    var flvControl:FLVPlayback;
    var MasterWindow = stage.nativeWindow;
    var screen1:Screen = Screen.screens[0];
    var screen2:Screen = Screen.screens[1];
    MASTER WINDOW SETUP
    this.loaderInfo.addEventListener(Event.COMPLETE,maximize);
    transControl.playPauseButt2.addEventListener(MouseEvent.CLICK, PlayButton);
    if (Screen.screens.length > 1){
              createVideoBKG();
              createVideoPlayer();
    GENERAL FUNCTIONS
    //Maximize the initial screen
    function maximize(e:Event) {
              MasterWindow.x = screen1.bounds.left
              MasterWindow.maximize();
              MasterWindow.stage.scaleMode = StageScaleMode.EXACT_FIT;
    //Hide Mouse Behind Video Window On Roll-Over
    function MouseRollOver(e:MouseEvent):void
              {          Mouse.hide()          }
    function MouseRollOut(e:MouseEvent):void
              {          Mouse.show()          }
    //Play-Pause Button Control
    function PlayButton(event:MouseEvent):void
                        if(transControl.playPauseButt2.currentFrame==1 ){
                                  transControl.playPauseButt2.gotoAndPlay(2);
                                  flvControl.play();
                        else {
                                  transControl.playPauseButt2.gotoAndPlay(1);
                                  flvControl.pause();
    function CloseWindow(e:MouseEvent):void
                        NativeApplication.nativeApplication.openedWindows[2].close();
    VIDEO BKG SETUP
    function createVideoBKG(e:Event = null):void{
              var newOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
              newOptions.type = NativeWindowType.LIGHTWEIGHT;
              newOptions.systemChrome = NativeWindowSystemChrome.NONE;
              newOptions.transparent = true;
              var videoBKG:NativeWindow = new NativeWindow(newOptions);
              if (Screen.screens.length > 1){
                        videoBKG.x = screen2.bounds.left;
              videoBKG.maximize();
              chromeSetup(videoBKG);
              videoBKG.activate();
    //Video BKG Chrome Setup
    function chromeSetup(currentWindow):void {
              var vidBKG = new video_bkg();
              vidBKG.name = "video_bkg2";
              vidBKG.addEventListener(MouseEvent.ROLL_OVER, MouseRollOver);
              vidBKG.addEventListener(MouseEvent.ROLL_OUT, MouseRollOut);
              currentWindow.stage.addChild(vidBKG);
    VIDEO Player SETUP
    function createVideoPlayer(e:Event = null):void{
              var newOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
              newOptions.type = NativeWindowType.LIGHTWEIGHT;
              newOptions.systemChrome = NativeWindowSystemChrome.NONE;
              newOptions.transparent = true;
              var videoPlayer:NativeWindow = new NativeWindow(newOptions);
              if (Screen.screens.length > 1){
                        videoPlayer.x = screen2.bounds.left;
                        videoPlayer.y = screen2.bounds.top;
                        videoPlayer.width = screen2.bounds.width;
                        videoPlayer.height = screen2.bounds.height;
                        videoPlayer.stage.scaleMode = StageScaleMode.NO_SCALE;
              videoPlayer.alwaysInFront = true;
              var DVR = new DVR_Player();
              DVR.name = "DVR";
              DVR.x = 0;
              DVR.y = 0;
              DVR.addEventListener(MouseEvent.ROLL_OVER, MouseRollOver);
              DVR.addEventListener(MouseEvent.ROLL_OUT, MouseRollOut);
              videoPlayer.stage.addChild(DVR);
                flvControl = DVR.display2;
              flvControl.width = 1280;
              flvControl.height = 720;
              flvControl.skin = null;
              flvControl.autoPlay=false;   
              flvControl.isLive=false;
              flvControl.fullScreenTakeOver = false;
              flvControl.align = VideoAlign.CENTER;
              flvControl.scaleMode = VideoScaleMode.NO_SCALE;
              flvControl.source = "olympics.f4v";
              flvControl.seekBar = transControl.seekbarContainer2.seeker;
              videoPlayer.activate();

    Does anyone have any ideas about this?

  • Packaging an AIR application in a native installer

    Hi! I'm trying to create a native installer of my AIR Application,  because (I think) it's the only way make the native processes working.  But I have a problem: I used the following command to pack: "adt  -package -storetype pkcs12 -keystore myCert.pfx -target native  -storetype pkcs12 -keystore myCert.pfx myApp.exe myApp-app.xml", but I get  the error: "File myApp-app.xml is not a valid AIRI or AIR file". In the  Flash Builder I use as additional compiler arguments:  "-locale=pt_PT,en_UK,fr_FR,de_DE,ro_RO,es_ES  -allow-source-path-overlap=true -source-path=assets" and I add the  source path "src/locale/{locale}/". What is the sintax for packing my  AIR application in a native installer? Thanks in advance.

    Hi again! Thanks for the reply. I based myself on the link to see what command syntax I should use to pack my Air Windowed Application and it was the command that I presented in the previous post.
    adt version "2.0.1.12090"
                                                  My Descriptor File
    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <application xmlns="http://ns.adobe.com/air/application/2.0">
    <!-- Adobe AIR Application Descriptor File Template.
        Specifies parameters for identifying, installing, and launching AIR applications.
        xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.0
                The last segment of the namespace specifies the version
                of the AIR runtime required for this application to run.
        minimumPatchLevel - The minimum patch level of the AIR runtime required to run
                the application. Optional.
    -->
        <!-- A universally unique application identifier. Must be unique across all AIR applications.
             Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
        <id>com.MyCompany.Application</id>
        <!-- Used as the filename for the application. Required. -->
        <filename>Production Control System</filename>
        <!-- The name that is displayed in the AIR application installer.
             May have multiple values for each language. See samples or xsd schema file. Optional. -->
        <name>Production Control System</name>
        <!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
        <version>2.1.3</version>
        <!-- Description, displayed in the AIR application installer.
             May have multiple values for each language. See samples or xsd schema file. Optional. -->
        <!-- <description></description> -->
        <!-- Copyright information. Optional -->
        <!-- <copyright></copyright> -->
        <!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
        <!-- <publisherID>My Company</publisherID> -->
        <!-- Settings for the application's initial window. Required. -->
        <initialWindow>
            <!-- The main SWF or HTML file of the application. Required. -->
            <!-- Note: In Flash Builder, the SWF reference is set automatically. -->
            <content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
            <!-- The title of the main window. Optional. -->
            <!-- <title></title> -->
            <!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
            <systemChrome>none</systemChrome>
            <!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
            <transparent>true</transparent>
            <!-- Whether the window is initially visible. Optional. Default false. -->
            <!-- <visible></visible> -->
            <!-- Whether the user can minimize the window. Optional. Default true. -->
            <!-- <minimizable></minimizable> -->
            <!-- Whether the user can maximize the window. Optional. Default true. -->
            <!-- <maximizable></maximizable> -->
            <!-- Whether the user can resize the window. Optional. Default true. -->
            <!-- <resizable></resizable> -->
            <!-- The window's initial width in pixels. Optional. -->
            <!-- <width></width> -->
            <!-- The window's initial height in pixels. Optional. -->
            <!-- <height></height> -->
            <!-- The window's initial x position. Optional. -->
            <!-- <x></x> -->
            <!-- The window's initial y position. Optional. -->
            <!-- <y></y> -->
            <!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
            <!-- <minSize></minSize> -->
            <!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
            <!-- <maxSize></maxSize> -->
        </initialWindow>
        <!-- We recommend omitting the supportedProfiles element, -->
        <!-- which in turn permits your application to be deployed to all -->
        <!-- devices supported by AIR. If you wish to restrict deployment -->
        <!-- (i.e., to only mobile devices) then add this element and list -->
        <!-- only the profiles which your application does support. -->
        <!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
        <supportedProfiles>extendedDesktop</supportedProfiles>
        <!-- The subpath of the standard default installation location to use. Optional. -->
        <!-- <installFolder></installFolder> -->
        <!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
        <!-- <programMenuFolder></programMenuFolder> -->
        <!-- The icon the system uses for the application. For at least one resolution,
             specify the path to a PNG file included in the AIR package. Optional. -->
        <!-- <icon>
            <image16x16></image16x16>
            <image32x32></image32x32>
            <image48x48></image48x48>
            <image128x128></image128x128>
        </icon> -->
        <!-- Whether the application handles the update when a user double-clicks an update version
        of the AIR file (true), or the default AIR application installer handles the update (false).
        Optional. Default false. -->
        <customUpdateUI>true</customUpdateUI>
        <!-- Whether the application can be launched when the user clicks a link in a web browser.
        Optional. Default false. -->
        <!-- <allowBrowserInvocation></allowBrowserInvocation> -->
        <!-- Listing of file types for which the application can register. Optional. -->
        <!-- <fileTypes> -->
            <!-- Defines one file type. Optional. -->
            <!-- <fileType> -->
                <!-- The name that the system displays for the registered file type. Required. -->
                <!-- <name></name> -->
                <!-- The extension to register. Required. -->
                <!-- <extension></extension> -->
                <!-- The description of the file type. Optional. -->
                <!-- <description></description> -->
                <!-- The MIME content type. -->
                <!-- <contentType></contentType> -->
                <!-- The icon to display for the file type. Optional. -->
                <!-- <icon>
                    <image16x16></image16x16>
                    <image32x32></image32x32>
                    <image48x48></image48x48>
                    <image128x128></image128x128>
                </icon> -->
            <!-- </fileType> -->
        <!-- </fileTypes> -->
        <!-- iPhone/iPad -specific capabilities -->
        <!-- <iPhone> -->
            <!-- A list of plist key/value pairs to be added to the application Info.plist -->
            <!-- <InfoAdditions>
                <![CDATA[
                    <key>UIDeviceFamily</key>
                    <array>
                        <string>1</string>
                        <string>2</string>
                    </array>
                    <key>UIStatusBarStyle</key>
                    <string>UIStatusBarStyleBlackOpaque</string>
                    <key>UIRequiresPersistentWiFi</key>
                    <string>YES</string>
                ]]>
            </InfoAdditions> -->
        <!-- </iPhone> -->
    </application>

  • How to embed and play mp4 video in HTML AIR application?

    Adobe Air HTML / JS application compiled from SDK command line.  I am not using flash pro or flash builder to create the application.
    I was using dreamweaver but the dw air plugin seems to have stopped being developed so I switched to using the command line tools.
    I am creating desktop air application that has embedded mp3 audio and also I want to embed mp4 video.
    Using jQuery and the AIR js plugin I am able to play audio via buttons hooked up via jQuery and the AIR js plugin from the SDK.
    What I am doing is creating proofs for clients in AIR and sending link to the client to download the application.  I embed the media because I do not want to place them on a website where it could possibly be seen by non-clients and get picked up in the SE's.
    I am finding it hard to understand the AIR process for playing video.  I read that it is the same procedure as audio but it does not work.
    If it was hosted on youtube or somewhere embedding the web player would be simple, just copy paste some code and it works.  When actually embedding the video say mp4, f4v, mov, wmv or similar file formats I can't get AIR to play the video.  Audio, not a problem it works great.
    I would like to do the following with video.
    Embed the actual file in the AIR app.  I can do this, it gets embedded.
    Play, pause and stop the video - Can't get this to work
    Get the current stop point and be able to start the video by sending a start point - This is all working with audio I just want to do it with video.
    I have searched the forums, the search engines, youtube and read through the documentation on Air but the video does not work at all.
    I need code samples and direction on how to make an embedded video play inside of a desktop air application using the HTML / JS air model. I am using the command line tools to create the air package and test the air app.
    Please help if you have figured this out.
    Thank you.
    Not sure if this matters but I am using Windows 7 Pro 64bit as my development machine.

    In addition I also can not get html5 video to play in the adobe air app.  Would this issue be tied to the above?

  • Incorrect functionality of Embedded tag in html page, displaying object on top of all layers of Adobe air application native window

    Title
    Incorrect functionality of embed tag in html loader for adobe air development
    Description
    Problem Description: If we had loaded youtube.com video url in a view stack and navigate to other index of stack or away from we UI screen within the same native window video or embeded tag of flash player or any other embed object will be displayed on top of all screens layer in same position of where the object should be placed in side of html loader only.
    Steps to Reproduce:
    1) go to http://get.straweb.com/StraWebBrowser/StraWebBrowser.air download and install
    2) load 2 tabs and in the 3 tab load video player of youtube.com which will a sample video
    before completing the load of 3 tab which trying to load video from youtube.com, navigate to other tabs 1 or 2 in few second once the flash player of youtube.com video player is load it will display in the current tab or UI screen.
    3) Try navigating to other tabs than youtube.com loaded tab you see the flash player is on top it stable.
    4) navigate to 3 tab and try to navigate to other tab you can observe that so how it will not show that flash player and only visible in that 3 tab which is fine.
    Actual Result: Embedded tag of html page displaying on top of all layers of Adobe air application native window
    Expected Result: Embedded tag of html page should only displayed in side htmlloader
    This you can replicate in any adobe air plugin update and on any Hardware and Environment.
    Applicable to all sdk versions of adobe air.

    Adobe Bugbase: Bug 3823839 Incorrect functionality of embed tag in html loader for adobe air development

  • How to save the date in Sqlite in Adobe Air application

    hi friends,
    i am doing a flex Adobe AIR Application with SQLITE Data base,in that i want to save Date in the following format DD/MM/YYYY, but in my TABLE i gave the data type is DATE,
    So it store the value like this Sun Dec 2 00:00:00 GMT+0530 2012.i want to store the value in DD/MM/YYYY.How to do that?
    looking for useful suggession.
    Cheers,
    B.venkatesan.

    Hi, maybe cannot help much on this since I have not much experiense on handling SQLITE in AIR.
    But I know there are a command/example for reading SQL:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/data/SQLConnectio n.html
    http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7d49.html
    And in mxml you should have an id for each individual TextInput component, also have a button:
    <Button click="updateSQLHandler(event)"/>
    When the button is click the handler function is launched.
    The updateSQLHandler(event:MouseEvent) is a script that read the each individual TextInput component by getting (id of textinput component).text.
    Then, you create a String varible that is an SQL commands with the texts in the form, and update the SQL database following the below using the execute() command (refer to http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7d49.html ).
    Hope this help.

  • Conversion to Adobe Air application to run on desktop?

    Hi all,
    I watched the Adobe tutorials and the presenter said that flash is more for designers wheras flex is more for developers. I would like to know if:
    1. It's possible to convert a flash application to an adobe air application to run on desktop? If so, how? (I really need to know this! )
    2. Besides development time, what else is the advantages of flex over flash? (also, is the claim that flex is faster to develop true?)
    3. Is there any tutorials on how to use Adobe Air? Is it a compiler or some sort?
    A few long questions here but i really hope you can take the time to answer them for me. Whatever feedback would be very much appreciated! Cheers!

    Hi Chien
    1) Sure you can develop AIR with flash, here a link to get you quickly started: http://www.adobe.com/devnet/air/flash/getting_started.html
    2) Advantage of Flex over Flash:
         - Less development time (if done right, no problems with layout, history, management)
         - Data driven applications can be done quicker with Flex then with Flash
         - There is absolutely nothing that you can't do with Flex over Flash, but to enhance the look & feel of the Flex components (buttons, panels) you can use Flash to skin and design.
    3) Look above step 1.
    Have fun
    Tiago

  • Adding native menus to an AIR application using ActionScript

    Hi,
    I'm working on Mac and PC with Air application.
    I'd creates a class extends Menu witch goal is to create a nativeMenu.
    My class is
    package
        import flash.desktop.DockIcon;
        import flash.desktop.NativeApplication;
        import flash.desktop.SystemTrayIcon;
        import flash.display.BitmapData;
        import flash.display.Loader;
        import flash.display.NativeMenu;
        import flash.display.NativeMenuItem;
        import flash.display.NativeWindow;
        import flash.display.NativeWindowDisplayState;
        import flash.display.NativeWindowSystemChrome;
        import flash.display.Screen;
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.events.NativeWindowDisplayStateEvent;
        import flash.geom.Rectangle;
        import flash.net.URLRequest;
        import flash.sampler.NewObjectSample;
        import mx.controls.Alert;
        import mx.controls.Menu;
        import mx.core.Application;
        import mx.core.FlexGlobals;
        import mx.core.WindowedApplication;
        import spark.components.Application;
        import spark.components.WindowedApplication;
        public class createMenuBar extends Menu
            public function createMenuBar()
             * Initializes the app after loading
            public function initWindow():void{
                // Create root menu
                var rootMenu:NativeMenu = new NativeMenu();
                // Create root submenus
                rootMenu.addSubmenu(creerMenuFichier(),"Fichier");
                rootMenu.addSubmenu(creerMenuEdition(),"Edition");
                // Attach event listener routine to root menu
                rootMenu.addEventListener(Event.SELECT, dispatchMenuCommand);
                // Assign application menu (Mac OS X)
                if(NativeApplication.supportsMenu){
                    NativeApplication.nativeApplication.menu = rootMenu;
                // Assign window menu (MS Windows)
                if(NativeWindow.supportsMenu ){
                    stage.nativeWindow.menu = rootMenu;
             * createMenuCommand()
             * Creates a menu command based on parameters
            public function createMenuCommand(menuContainer:NativeMenu,
                itemLabel: String, itemKey:String,itemModifiers:Array,
                itemMnemonic:int, selectHandler:Function):NativeMenuItem{
                var cmd:NativeMenuItem = NativeMenu(menuContainer).addItem(new NativeMenuItem(itemLabel));
                cmd.mnemonicIndex = itemMnemonic; // index de la lettre de rappel du raccourci par dŽfaut 0
                cmd.keyEquivalent = itemKey;
                if(itemModifiers !=null){
                    cmd.keyEquivalentModifiers = itemModifiers;
                if (selectHandler !=null){
                    cmd.addEventListener(Event.SELECT, selectHandler);
                return cmd;
             * createMenuSeparator()
             * Creates a menu separator
            private function createMenuSeparator(menuContainer:NativeMenu):NativeMenuItem{
                var sep : NativeMenuItem = NativeMenu(menuContainer).addItem(new NativeMenuItem("sep", true));
                return sep;
             * Creates the File menu for app
            private function creerMenuFichier(): NativeMenu{
                var mnu:NativeMenu = new NativeMenu();
                createMenuCommand(mnu, 'Changer Utilisateur','k',null, 0, hChangeUser);
                createMenuCommand(mnu, 'Verrouiller/DŽverrouiller','', null, 0, hLock);
                createMenuCommand(mnu, 'Maintenance','', null, 0, hMaintenance);
                createMenuSeparator(mnu);
                // If Mac OS X, then use Quit label
                if (NativeApplication.supportsMenu) {
                    createMenuCommand( mnu, 'Quitter', 'q', null, 0, hExit); 
                // If Windows, then use Exit
                else {
                    createMenuCommand( mnu, 'Fermer', 'x', null, 0, hExit);
                return mnu; 
            public function creerMenuEdition() : NativeMenu{
                var mnu:NativeMenu = new NativeMenu();
                createMenuCommand( mnu, 'Annuler', 'z', null, 0, null); 
                createMenuCommand( mnu, 'RŽpŽter', 'y', null, 0, null);
                createMenuSeparator(mnu);   
                createMenuCommand( mnu, 'Couper', 'x', null, 2, null); 
                createMenuCommand( mnu, 'Copier', 'c', null, 0, null); 
                createMenuCommand( mnu, 'Coller', 'v', null, 0, null); 
                return mnu;
             * Catch-all menu dispatcher for all menus
            public function dispatchMenuCommand(evt: Event):void {
                var menuItem:NativeMenuItem = evt.target as NativeMenuItem;
                if (!menuItem.hasEventListener('select')) { 
                    Alert.show(menuItem.label + " a ŽtŽ selectionnŽ!");
             * Simple handlers for certain menu commands
            public function hChangeUser(evt: Event):void {
                Alert.show( "Vous allez changer d'utilisateur");
    On main air app.mxml file I create menu with
    var menu : createMenuBar = new createMenuBar();
      menu.initWindow();
    application menu appear but when I work on Windows system, windows menu is not visible.
    Can you help me to solve that?
    Thanks

    I believe you ran into an AIR limitation.  In the class header for NativeMenu it mentions:
    A native menu is a menu that is controlled and drawn by the operating system rather than by your application.       AIR supports the following types of native menus:
    Application menus are supported on OS X. Use the NativeApplication.supportsMenu property to test whether        application menus are supported on the host operating system. An  application menu is displayed on the Menu bar at the top of the        Mac desktop. OS X provides a default menu for every application, but  many of the menu commands are not functional. You can add       event listeners to the default items, replace individual menus and  items, or even replace the default menu entirely.       Access the application menu object using the NativeApplication menu property.
    Window menus are supported on Windows and Linux. Use the NativeWindow.supportsMenu property to       test whether window menus are supported on the host operating system. A  window menu is displayed below the window title bar. The area       occupied by the menu is not part of the window stage. Applications  cannot draw into this area. Assign a menu to a window using the        NativeWindow menu property.
    -ref: http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/display/Nati veMenu.html
    Use the NativeMenu.isSupported property to check if OS supports it.  There is also NativeWindow.supportsMenu property that may help you.  I hope that helps.

  • Can an AIR application be packaged and launched from inside a Native Android Application

    Hello,
    I work for a company that has an AIR application/game.  We are currently developing an Android native application and would like to strip out the AIR game and include it with the native application, we would like to be able to launch the game from within the native Android application.  How would this be done?

    no p. )
    [UIApplication sharedApplication] its most cool thing in xcode that allow make native windows over adobe air

  • Windows 7 Manifest file embedded in native AIR application exe created by ADT

    i have executed string utility to extract all the strings in an AIR application exe and found windows 7 manifest file is embedded with level set to invoker (standard user). We want to change the level to "require administrator" so that exe will automatically launched with administrative privileges but we are unable to find how the manifest file get embedded.
    Help appreciated
    Thanks

    Found out the manifest file get embedded when building native installer. Still don't how the manifest file is added and how to change level to "require administrator" in manifest file.
    Help Appreciated
    Thanks

  • Can HTML based browsers rotate along with a Desktop AIR application if browser is modular?

    I get a buged out browser module in my Desktop AIR application after doing an application level rotation/orientation-change/flip screen for viewing on other side of monitor .
    Most of the HTML content rotates 180 degrees without any issue, but, it seems some of the "components" aren't getting with the program.
    Dropdown box lists don't rotate, even though the button to initate use of the dropdown list does. So, when viewing the application from the new orientation,
    the dropdown lists are upside down from an end user perspective ( just never rotated properly from a developer perspective )
    I was having to flip my application by sending out a message to a service and recieving the call from a WCF to tell the whole OS to flip via WIN32 API but
    64bit operating systems do this a lot slower, so i'm trying to find a new solution.
    I am wondering if a workaround can be done by replacing the misbehaving things like the dropdown box with native flex components?
    Any thoughts/ideas/conclusions?

    Did you try ...
    location.href = url

Maybe you are looking for