Air application position on desktop

hi there,
i have an application(air) i want to load in the center of my desktop.
the application has a fixed size.
If i start my application it is not loaded in the center of my screen, the bottom of my application runs out of the screen.
so my question; How to calculate the desktop sizes and set the application on a specific point?
for example top right or bottom left.
Greetz, jacob

Hi,
I did use this:
var mainScreen:Screen = Screen.mainScreen;
var screenBounds:Rectangle = mainScreen.bounds;
this.x =(screenBounds.width - this.width)/2;
this.y =(screenBounds.height - this.height)/2;
But that shifted the custom chrome and modified the widht and height of my application.
I use an application with a custom chrome.
The code i use:
centerapp.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    creationComplete="initApp()"
    layout="absolute"
    width="1024"
    height="768"
    paddingRight="0"
    paddingLeft="0"
    visible="false"
    backgroundImage="@Embed('img/decoratieframe.png')"
    applicationComplete="onApplicationComplete();"
    xmlns:localcanvas="*">
    <mx:Style>
        Application
            /* make app window transparent */
            background-color:"";
            background-image:"";
            padding: 0px;
    </mx:Style>    
     <mx:Script>
          <![CDATA[
               import mx.containers.Canvas;
               import flash.display.Screen;
          // stuff for the application dragg
               public var shadowFilter:DropShadowFilter;
            private var baseBgColor:Number = 0x888888;
            private function initApp():void
                // adds mouseDown listeners so a click and drag on the background or the
                // display area lets you move the window
                this.bgBox.addEventListener(MouseEvent.MOUSE_DOWN, onMouseOmlaag);
                // creates a generic drop shadow to use on components that don't accept CSS shadow styles
                shadowFilter = new DropShadowFilter();
                shadowFilter.color = 0x000000;
                shadowFilter.alpha = 0.4;
                shadowFilter.blurX = 5;
                shadowFilter.blurY = 5;
                shadowFilter.distance = 5;
                // 'external' shadows
                addShadow(this.bgBox);
                // retrieves the current background color to use as a base for
                // color calculations; this way you could use a CSS stylesheet
                // to change the base background color in the future.
                var baseColor:* = this.bgBox.getStyle("backgroundColor");
                if(!isNaN(baseColor) && baseColor != null)
                    this.baseBgColor = baseColor as Number;
             * Adds a standard drop shadow to a display object.
            public function addShadow(comp:DisplayObject):void
                comp.filters = [this.shadowFilter];
             * Responds to a mouseDown event by starting an operating-system move sequence.
            private function onMouseOmlaag(evt:MouseEvent):void
                stage.nativeWindow.startMove();
             * Responds to a move event. (Currently not in use)
            public function onWindowMove(event:Event):void
                trace("Window is moving...");
             * Responds to a window close event after the window's close button has been clicked.
            private function onClose(evt:MouseEvent):void
                stage.nativeWindow.close();
             * Responds to a window minimize event, after the minimize button has been clicked
            private function onMinimize(evt:MouseEvent):void
                stage.nativeWindow.minimize();
            private function onApplicationComplete():void
                 var screenwidth:Number=Capabilities.screenResolutionX;
                 var screenheight:Number=Capabilities.screenResolutionY;
                 // 2 lines beneath give different result than
                 this.x=(screenwidth-this.width)/2;
                 this.y=(screenheight-this.height)/2;
                 //this 2 lines.    
                 //this.x=Capabilities.screenResolutionX-(this.width/2);
                 //this.y=Capabilities.screenResolutionY-(this.height/2);
                 //var mainScreen:Screen = Screen.mainScreen;
                 //var screenBounds:Rectangle = mainScreen.bounds;
                 //this.x =(screenBounds.width - this.width)/2;
                 //this.y =(screenBounds.height - this.height)/2;            
                 this.visible=true;
          ]]>
     </mx:Script>
        <mx:HBox width="908" horizontalGap="0" height="35" id="bgBox" x="58" y="51">     
             <mx:Canvas width="908" height="34">
             <mx:Button id="minimizeBtn"
                 icon="@Embed('img/minimize_icon.png')"
                 horizontalGap="0"
                 width="23.5"
                 height="23.5"
                 click="onMinimize(event)" x="841.5" y="5"/>
             <mx:Button id="closeBtn"
                 icon="@Embed('img/close_icon.png')"
                 width="23.5"
                 height="23.5"
                 click="onClose(event)"  x="869.5" y="5"/>
             </mx:Canvas>
        </mx:HBox>    
</mx:Application>
and the file that goes with that:
centerapp-app.xml
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/1.0">
     <id>centerapp</id>
     <version>1.0</version>
     <filename>centerapp</filename>
     <name>centerapp</name>
     <installFolder>centerapp</installFolder>
     <programMenuFolder>centerapp</programMenuFolder>
     <description>centerapp</description>
    <copyright>centerapp</copyright>
     <initialWindow>
          <title></title>
          <content>centerapp.swf</content>
          <systemChrome>none</systemChrome>
          <transparent>true</transparent>
          <visible>true</visible>
         <minimizable>true</minimizable>
         <maximizable>false</maximizable>
         <resizable>false</resizable>   
     </initialWindow>
    <fileTypes>
        <fileType>
            <name>adobe.VideoFile</name>
            <extension>avf</extension>
            <description>Adobe Video File</description>
            <contentType>application/vnd.adobe.video-file</contentType>
        </fileType>
    </fileTypes>
</application>
In the folder src i made a folder img for the chrome image and the close and minimize button.

Similar Messages

  • Changing application position on desktop when starting application

    Is there a way to change the screen position of an application when I am starting the application? Every time I open QuickTime, it starts in the upper left corner.
    Even after moving and closing the application it starts up in the upper left corner again.

    Settings like this are generally application dependent - that is, you can do it if the application gives you some kind of control over default window positions. Most don't, since the standard is for the upper-left corner. There's no easy way around this

  • Help need in drag drop operation in AIR application

    I would like to know if there is a way to drag and drop an attachment file from an desktop mail client application(similar to MSoutlook)  into an AIR application and make it accessible to the AIR application.
    I did experiments with this the drag operation and its giving AIR a File Promise List format as its file type.
    But I'm not exactly sure how to make use of it once it is dropped. The examples in web explains how to manupilate File Promises list format from an AIR application to the desktop.
    There is not much explainations about droping a file promise list format into an AIR app. your valuable help will be greatly appreciated.

    Dear all,
    Is the above mentioned task feasible or not?.If not do mention any other way for implementing this functionality or close to it.
    Thanks

  • Screen recording of AIR app on Windows desktop

    I have developed an Adobe AIR application for windows desktop that runs at 60fps, full HD (classic display list, not Starling). I would like to record this app being used for promotional purposes, and have tried Camtasia and Action! Recorder (with software encoders), but neither of these achieve the required frame rate.
    My PC configuration is:
    i7-3930K @ 3.20GHz
    32GB RAM
    Windows 7 Pro 64-bit
    2 x NVidia GT 440 graphics cards
    500GB SSD
    If I upgrade my Nvidia graphics card to one of the newer models, such as a Geforce GTX 970, I can make use of the NVENC technology that provides hardware video encoding of DirectX or the Windows desktop. Action! Recorder apparently supports the NVENC technology on the Nvidia cards, to provide improved video recording.
    Does anyone have any experience of using NVENC to record Adobe AIR desktop applications that use classic display list, rather than Starling, and can I expect to record a decent frame rate?

    Anyone?

  • Desktop AIR Application installs fine on Mac... crashes on PC

    Hey guys,
    I ran into an issue that has be pulling my hair out. I have a very simple AIR application that was built with Flash CS6 on a Mac. The published app installs and runs perfectly on my Mac. Installation goes just fine on a PC, but the app will not launch! The window starts to come up and immediately crashes. I just finished making a desktop app in the last version of AIR and it ran perfect on PC.
    Has anyone else experienced this issue? So much fun using a Mac when most clients use PC lol!

    It's actually quite a tiny app. Tiny enough that I'm just coding in Flash CS6 in the first frame noob style LOL. I published another AIR app like this recently and it worked just fine on PC.
    Here is literally all of the code that runs the app. I am using the File class to access the desktop directory for some files, but my understanding is that it should access the desktop the same on PC and Mac.
    Thanks for the time and help... I could have a friend publish on a PC, but it would be much more convenient if I could get it to work correctly .
    import flash.display.MovieClip;
    import flash.display.SimpleButton;
    import flash.events.MouseEvent;
    import flash.filesystem.File;
    import flash.display.Loader;
    import flash.ui.MouseCursor;
    // START VARIABLE DECLARATION
    var XMLDirectory:File = File.desktopDirectory;
    XMLDirectory = XMLDirectory.resolvePath("missing_person/results.xml");
    var myXML:XML;
    var imageDirectory:File = File.desktopDirectory;
    imageDirectory = imageDirectory.resolvePath("missing_person/images/");
    var screen_saver:MovieClip;
    var part1_mc:MovieClip;
    var part2_mc:MovieClip;
    var rightBtn:SimpleButton = part2_mc.right_btn;
    var leftBtn:SimpleButton = part2_mc.left_btn;
    var heightOpt:MovieClip = part1_mc.height_options_mc;
    var heightBtn:SimpleButton = part1_mc.height_btn;
    var genderOpt:MovieClip = part1_mc.gender_options_mc;
    var genderBtn:SimpleButton = part1_mc.gender_btn;
    var ageOpt:MovieClip = part1_mc.age_options_mc;
    var ageBtn:SimpleButton = part1_mc.age_btn;
    var searchBtn:SimpleButton = part1_mc.search_btn;
    var resetBtn:SimpleButton = header_mc.restart_btn;
    var searchingDB:MovieClip = part1_mc.searching_mc;
    var startArray:Array = [[],[]];
    var ageStr:String = "";
    var heightStr:String = "";
    var genderStr:String = "";
    // KEEPS OVER STATES FOR BUTTONS
    var heightState = heightBtn.upState;
    var genderState = genderBtn.upState;
    var ageState = ageBtn.upState;
    var searchState = searchBtn.upState;
    // LOAD AND PARSE XML
    var myLoader:URLLoader = new URLLoader();
    myLoader.load(new URLRequest(XMLDirectory.url));
    myLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(e:Event):void
        myXML = new XML(e.target.data);
        for (var i:int = 0; i < myXML.result.length(); i++)
            startArray[i] = [(imageDirectory.url + "/" + myXML.result[i].image), myXML.result[i].name, myXML.result[i].age, myXML.result[i].gender, myXML.result[i].height, myXML.result[i].description, myXML.result[i].features];
            trace(startArray[i][0]);
    //CODE FOR BUTTON RESET
    resetBtn.addEventListener(MouseEvent.MOUSE_DOWN, resetAll);
    function resetAll(event:MouseEvent):void
        enableButtons();
        heightOpt.visible = false;
        genderOpt.visible = false;
        ageOpt.visible = false;
        searchingDB.visible = false;
        part1_mc.height_txt.text = "";
        part1_mc.gender_txt.text = "";
        part1_mc.age_txt.text = "";
        part2_mc.visible = false;
        part2_mc.removeChild(resultContainer);
    //BEGIN INITIALIZATION ;
    function init():void
            part1_mc.height_txt.text = "";
        part1_mc.gender_txt.text = "";
        part1_mc.age_txt.text = "";
        part1_mc.visible = false;
        part2_mc.visible = false;
        screen_saver.visible = true;
        heightOpt.visible = false;
        genderOpt.visible = false;
        ageOpt.visible = false;
        searchingDB.visible = false;
    init();
    heightBtn.addEventListener(MouseEvent.MOUSE_DOWN, showHeights);
    genderBtn.addEventListener(MouseEvent.MOUSE_DOWN, showGenders);
    ageBtn.addEventListener(MouseEvent.MOUSE_DOWN, showAges);
    function showHeights(event:MouseEvent):void
        heightOpt.visible = true;
        disableButtons();
        //ADD EVENT LISTENERS FOR HEIGHT OPTIONS
        heightOpt.opt_1.addEventListener(MouseEvent.MOUSE_DOWN, setHeight1);
        heightOpt.opt_2.addEventListener(MouseEvent.MOUSE_DOWN, setHeight2);
        heightOpt.opt_3.addEventListener(MouseEvent.MOUSE_DOWN, setHeight3);
        heightOpt.opt_4.addEventListener(MouseEvent.MOUSE_DOWN, setHeight4);
        heightOpt.opt_5.addEventListener(MouseEvent.MOUSE_DOWN, setHeight5);
        heightOpt.opt_6.addEventListener(MouseEvent.MOUSE_DOWN, setHeight6);
    function showGenders(event:MouseEvent):void
        genderOpt.visible = true;
        disableButtons();
        //ADD EVENT LISTENERS FOR HEIGHT OPTIONS
        genderOpt.opt_1.addEventListener(MouseEvent.MOUSE_DOWN, setGender1);
        genderOpt.opt_2.addEventListener(MouseEvent.MOUSE_DOWN, setGender2);
        genderOpt.opt_3.addEventListener(MouseEvent.MOUSE_DOWN, setGender3);
    function showAges(event:MouseEvent):void
        ageOpt.visible = true;
        disableButtons();
        //ADD EVENT LISTENERS FOR HEIGHT OPTIONS
        ageOpt.opt_1.addEventListener(MouseEvent.MOUSE_DOWN, setAge1);
        ageOpt.opt_2.addEventListener(MouseEvent.MOUSE_DOWN, setAge2);
        ageOpt.opt_3.addEventListener(MouseEvent.MOUSE_DOWN, setAge3);
        ageOpt.opt_4.addEventListener(MouseEvent.MOUSE_DOWN, setAge4);
        ageOpt.opt_5.addEventListener(MouseEvent.MOUSE_DOWN, setAge5);
        ageOpt.opt_6.addEventListener(MouseEvent.MOUSE_DOWN, setAge6);
    function disableButtons():void
        heightBtn.upState = heightBtn.downState;
        heightBtn.enabled = false;
        genderBtn.upState = genderBtn.downState;
        genderBtn.enabled = false;
        ageBtn.upState = ageBtn.downState;
        ageBtn.enabled = false;
        searchBtn.upState = searchBtn.downState;
        searchBtn.enabled = false;
    function enableButtons():void
        heightBtn.upState = heightState;
        heightBtn.overState = heightState;
        heightBtn.hitTestState = heightState;
        heightBtn.enabled = true;
        genderBtn.upState = genderState;
        genderBtn.overState = genderState;
        genderBtn.hitTestState = genderState;
        genderBtn.enabled = true;
        ageBtn.upState = ageState;
        ageBtn.overState = ageState;
        ageBtn.hitTestState = ageState;
        ageBtn.enabled = true;
        searchBtn.upState = searchState;
        searchBtn.overState = searchState;
        searchBtn.hitTestState = searchState;
        searchBtn.enabled = true;
    //ASSORTED FUNCTIONS TO SET THE TEXT FOR THE HEIGHT OPTION
    function setHeight1(event:MouseEvent)
        part1_mc.height_txt.text = "135-145cm";
        enableButtons();
        heightOpt.visible = false;
    function setHeight2(event:MouseEvent)
        part1_mc.height_txt.text = "145-155cm";
        enableButtons();
        heightOpt.visible = false;
    function setHeight3(event:MouseEvent)
        part1_mc.height_txt.text = "155-165cm";
        enableButtons();
        heightOpt.visible = false;
    function setHeight4(event:MouseEvent)
        part1_mc.height_txt.text = "165-175cm";
        enableButtons();
        heightOpt.visible = false;
    function setHeight5(event:MouseEvent)
        part1_mc.height_txt.text = "175-185cm";
        enableButtons();
        heightOpt.visible = false;
    function setHeight6(event:MouseEvent)
        part1_mc.height_txt.text = "Unknown";
        enableButtons();
        heightOpt.visible = false;
    function setGender1(event:MouseEvent)
        part1_mc.gender_txt.text = "Male";
        enableButtons();
        genderOpt.visible = false;
    function setGender2(event:MouseEvent)
        part1_mc.gender_txt.text = "Female";
        enableButtons();
        genderOpt.visible = false;
    function setGender3(event:MouseEvent)
        part1_mc.gender_txt.text = "Unknown";
        enableButtons();
        genderOpt.visible = false;
    function setAge1(event:MouseEvent)
        part1_mc.age_txt.text = "20-30 years old";
        enableButtons();
        ageOpt.visible = false;
    function setAge2(event:MouseEvent)
        part1_mc.age_txt.text = "31-40 years old";
        enableButtons();
        ageOpt.visible = false;
    function setAge3(event:MouseEvent)
        part1_mc.age_txt.text = "41-50 years old";
        enableButtons();
        ageOpt.visible = false;
    function setAge4(event:MouseEvent)
        part1_mc.age_txt.text = "51-60 years old";
        enableButtons();
        ageOpt.visible = false;
    function setAge5(event:MouseEvent)
        part1_mc.age_txt.text = "71-80 years old";
        enableButtons();
        ageOpt.visible = false;
    function setAge6(event:MouseEvent)
        part1_mc.age_txt.text = "Unknown";
        enableButtons();
        ageOpt.visible = false;
    screen_saver.addEventListener(MouseEvent.CLICK, hideScreenSaver);
    function hideScreenSaver(event:MouseEvent):void
        screen_saver.visible = false;
        part1_mc.visible = true;
    //START EXECUTING SEARCH
    searchBtn.addEventListener(MouseEvent.MOUSE_DOWN, startSearch);
    var resultContainer:MovieClip;
    var resultCount:int = 0;
    var position:int = 1;
    function startSearch(event:MouseEvent):void
        resultContainer = new MovieClip;
        part2_mc.addChild(resultContainer);
        disableButtons();
        ageStr = part1_mc.age_txt.text;
        heightStr = part1_mc.height_txt.text;
        genderStr = part1_mc.gender_txt.text;
        searchingDB.visible = true;
        part2_mc.visible = true;
        rightBtn.visible = false;
        leftBtn.visible = false;
        createResults();
    rightBtn.addEventListener(MouseEvent.MOUSE_UP, moveRight);
    leftBtn.addEventListener(MouseEvent.MOUSE_UP, moveLeft);
    function moveRight(event:MouseEvent):void
        if (position < Math.ceil(resultCount/3))
            resultContainer.x = resultContainer.x - 1680;
            position++;
        else
        checkRight();
    function moveLeft(event:MouseEvent):void
        if (position > 1)
            resultContainer.x = resultContainer.x + 1680;
            position--;
        else
        checkLeft();
    function checkRight():void
        if (position < Math.ceil(resultCount/3))
        else
            rightBtn.visible = false;
            if (position > 1)
                leftBtn.visible = true;
    function checkLeft():void
        if (position > 1)
        else
            leftBtn.visible = false;
            if (position < Math.ceil(resultCount/3))
                rightBtn.visible = true;
    function createResults():void
        var resultY = 250;
        var startX = 175;
        resultCount = 0;
        trace(ageStr.substr(0,2), ageStr.substr(3,2));
        trace(startArray[i][2]);
        for (var i:int=0; i < startArray.length; i++)
            if ((parseInt(startArray[i][2]) >= parseInt(ageStr.substr(0,2)) && parseInt(startArray[i][2]) <= parseInt(ageStr.substr(3,2))) || ageStr == "" || ageStr == "Unknown")
                if ((startArray[i][4] >= heightStr.substr(0,3) && startArray[i][4] <= heightStr.substr(4,3)) || heightStr == "" || heightStr == "Unknown")
                    if (genderStr == "" || genderStr == startArray[i][3] || genderStr == "Unknown")
                        var resultItem = new result_item();
                        resultItem.name = "r_" + i;
                        resultItem.name_txt.text = startArray[i][1];
                        resultItem.gender_txt.text = "Gender: " + startArray[i][3];
                        resultItem.height_txt.text = "Height: " + startArray[i][4] + "cm";
                        resultItem.age_txt.text = "Age: " + startArray[i][2];
                        resultItem.description_txt.text = "                                " + startArray[i][5];
                        resultItem.features_txt.y = (resultItem.description_txt.y + resultItem.description_txt.height) + 20;
                        resultItem.features_txt.text = "Distinguishing Features: " + startArray[i][6];
                        var l=new Loader();
                        l.x = l.y = 0;
                        l.load(new URLRequest(startArray[i][0]));
                        resultItem.image_holder.addChild(l);
                        resultItem.y = resultY;
                        resultItem.x = startX;
                        if ((resultCount+1)%3 == 0)
                            startX = startX + 780;
                        else
                            startX = startX + 450;
                        resultContainer.addChild(resultItem);
                        resultCount++;
                        if (resultCount > 3)
                            rightBtn.visible = true;

  • Can you wrap a Muse export in Adobe Air to make a desktop application?

    Hello,
    I was just wondering if it is possible to wrap a Muse HTML folder (whole export) in Adobe Air to make a desktop application? I have managed to wrap the business catalyst URL that Muse gives you temporarily and made a desktop application. As this is temporary is it possible to wrap the entire project (HTML)?
    I'm very new to this so i hope this all makes sense.
    Thanks in advance,
    SPolly

    You are not wasting your time. It can be done...
    In order to wrap C++ for use by C, you must write wrapper functions declared with 'extern "C"' linkage for every C++ method you intend to call directly from C. This must be done using a C++ compiler. Once linked into a new library, any C exectuable or C library should be able to link this new library and call the wrapper functions you have declared 'extern "C"'.
    If you still need more help, I would advise you to post in a C++ language forum perhaps. Best of luck, not that you should need it though... -Ralph

  • Launching air application like adobe connect desktop

    I will like to launch my adobe air application like adobe connect meeting room launches the desktop app

    Thanks.
    reinstalling and clearing my temp dir appears to have worked !
    Awesome.

  • 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

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

  • 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

  • URL for Redirecting to a Desktop AIR Application

    Hi,
    I'm developing a Flex Project that runs on ADOBE AIR. This
    project contains two Flex desktop applications that runs in ADOBE
    AIR.Now i need to redirect to one Flex desktop application from
    another Flex desktop application.Can anyone please tell me how the
    URL should look like in the new UrlRequest( ). Thanks in advance
    for any help....................

    You can launch an AIR application from the browser if a few
    requirements are met.
    *Use must have the application already installed.
    *The application must have "allowBrowserInvocation" set to
    true in the application descriptor.
    *Must have AIR installed
    *Application must be launched by some sort of user
    interaction, ie, a mouse click (can't be launch
    automatically)

  • Integrate google desktop search with AIR application

    My requirement is to integrate google desktop search with my AIR application.If any one has any idea on this, please help me.

    Yes,
    I think you can use the ImageSnapShot class, and thern use the bitmap data from it as you desire.
    You can use the snapshot to take a grab of any element/child in your application or presumably you can take a snapshot of the main application if you want the whole lot.
    I used this method recently to print a screen state.
    var imgWidth:Number = 400;
    var img:SWFLoader = new SWFLoader();
    img.id = "appSnapShot";
    var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(myScreenInstance as IBitmapDrawable);
    var imageByteArray:ByteArray = imageSnap.data as ByteArray;
    img.load(imageByteArray);
    img.scaleContent = true;
    img.width = imgWidth;
    img.maintainAspectRatio = true;
    application.addElement(img);
    Maybe that will help.

  • Trying to load MP3 from desktop to AIR application

    I'm trying to load an MP3 file into an Air application.
    Here's some code. The first 2 lines are in my constructor
    fileToOpen.browseForOpen("Open", [new FileFilter("MP3",
    "*.mp3")]);
    fileToOpen.addEventListener(Event.SELECT, fileSelected);
    private function fileSelected(event:Event):void
    var stream:FileStream = new FileStream();
    trace(fileToOpen.nativePath);
    // sound = new Sound(new URLRequest(fileToOpen.nativePath));
    // trace(sound);
    stream.open(event.target, FileMode.READ);
    trace(stream.bytesAvailable);
    sound = new Sound(stream.readBytes(stream.bytesAvailable));
    channel = sound.play(00000);
    addEventListener(Event.ENTER_FRAME, onEnterFrame);
    Using URLRequest gives me the error Error #2044: Unhandled
    IOErrorEvent:. text=Error #2032: Stream Error. I can't seem to load
    a file when I give it the full path. Then with the file stream, I
    don't even know what I'm doing. I don't know which method I'm
    supposed to use to load the file into a sound object. Please
    help...

    I figured it out. I tried url instead of nativePath for the
    file object and it worked.

  • Can developers distribute the Adobe AIR installer with their desktop applications?

    Yes. In addition to creating and distributing cross-platform Adobe AIR application installer files, it is possible for developers to write their own custom native installers that install Adobe AIR and the Adobe AIR application.
    In order to do this, developers must first apply for and receive a free http://www.adobe.com/products/air/runtime_distribution1.html.

    I'm going to forward this along to our android team for their review.  In the meantime, could you open a bug on this over at bugbase.adobe.com?  Please post back with the URL so that others affected can visit the bug and cast their votes.
    Thanks,
    Chris

  • Protect a desktop air application

    HI
    I currently use Zinc to wrap my swf and then add softlocker copy protection to that
    it all works ok.
    I would prefer to use an air application but need to know if is there is a way
    to prevent users just copying it onto other computers.
    cheers
    KBN

    The method I use will allow you encrpyt most of your source code using a key that is unique to every computer.
    The initial download of my software is a simple air app that does not contain the actual program. It is more like a shell that first retreaves a list of the clients mac addresses and the user entered activation code that is created at time of purchase. This is sent to server and logged.  The activation code is saved to a file client side.  At the server the mac address and activation key are used to create the encryption key.  The bulk of the program code is then encrypted using that key, then divided into parts and sent back to the client.
    The client puts the parts back together and saves the encrypted file.
    At runtime the shell finds the mac address list and the activation key, then using same method as server gets the encryption key and decrypts the program file. Run simple check to make sure it loaded. For encyption i found an aes method that works in php and javascript.
    Next I use this code to load the program
    var loader = air.HTMLLoader.createRootWindow(true, options, true, windowBounds);
    loader.cacheResponse=false;
    loader.placeLoadStringContentInApplicationSandbox=true;
    loader.loadString(page);
    This method makes it very difficult to copy to another computer although since I wrote it i know there are some weeknesses in the security but to make it harder i obv. the shell code. It at least keeps most from pirating.
    However there are issues with this that I have found.
    First i was using networkInfo to get the list of mac address but this failed in a test windows XP computer.  When the wireless was off it did not return the MAC.  I was not able to recreate this in VISTA or 7.  Not sure if it could happen.  Was not tested on a mac computer.  To fix this (at least for windows).  I wrote a simple bat file that gets the MAC list, then converted it to an exe which is included.  This does force you to create native installers.  call the exe with this
    var nativeProcessStartupInfo = new air.NativeProcessStartupInfo();
    var file = air.File.applicationDirectory.resolvePath("findmac.exe");
    nativeProcessStartupInfo.executable = file;
    process = new air.NativeProcess();
    process.start(nativeProcessStartupInfo);
    process.addEventListener(air.ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);
    process.addEventListener(air.ProgressEvent.STANDARD_ERROR_DATA, onErrorData);
    process.addEventListener(air.NativeProcessExitEvent.EXIT, onExit);
    process.addEventListener(air.IOErrorEvent.STANDARD_OUTPUT_IO_ERROR, onIOError);
    process.addEventListener(air.IOErrorEvent.STANDARD_ERROR_IO_ERROR, onIOError);
    put the list  together in the onOutputData event using array.push
    and continue on the onExit event
    using the findmac.exe will return the same info every time (that i know of)
    beware thought that using the native install will break the standard application update process so you will have to write your own.  my updates are processed the same way as above.
    This is contents of the .bat file to get the mac list
    @Echo off
    SETLOCAL
    SET MAC=
    SET Media=Connected
    FOR /F "Tokens=1-2 Delims=:" %%a in ('ipconfig /all^| FIND "Physical Address"') do @echo %%b
    ENDLOCAL
    using this method makes it simple to implement at try before you by method.  at runtime if no activation code get try me version from server instead of full version.

Maybe you are looking for

  • JNDI NameNotFoundException on ctx.lookup in WLS 6.1

    Hi dear all When deploying several entity beans in WLS 6.1 we always get a NameNotFoundException on the ctx.lookup for each bean. The JNDI name is defined (for every bean) in the IDE and also available in the WLS console (i.e. also in the deployment

  • Integrating Flash With Java Game

    hi guys, i'm doing the final touch up for my RPG, i plan to put flash animation as intro before my game starts, is it possible to call .swf file directly from java itself, how am i gonna make it possible??Please advice~ Thanks~

  • Date Manipulation

    Currently, i'm designing an application which needs to correctly insert/fetch data of type Date to/from a database. Unfortunately, i'm new to the java utilities for doing manipulation of Date-type data. I need help to design procedures to do some thi

  • Weather in notification center

    I can't get the weather to show in the notification center. Location services is enabled. Weather is enabled. Any suggestion?

  • Optimizing Flash file for Internet

    I have a 10MB flash file that I have uploaded to my website. No idea if this is large or small for a Flash file! The Flash appears on my index.html page.  I have noticed that different browsers react differently, but when I open the page initially th