AIR Custom Chrome v.02

Since AIR 1.0 has been released, I have been recieving requests to post an updated version of my AIR Custom Chrome example. I have also added a couple features in this release:

1. Synchronization - This is a pattern that I have been using/ extending on various projects. In short, there is a pop menu that is spawned that allows for various synchronization settings. You will also notice that I have included the various connection states and the appropriate icons & source files. So take a peak and let me know what you think.

2. Window Resizing

That’s about it. Let me know if there are some folks that would like a bit more of an in depth explanation of this approach.

AIR Custom Chrome v.02 example

*The “Source” is available by right-clicking and selecting ‘view-source’ in the application.

**This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

18 Responses to “AIR Custom Chrome v.02”

  1. German Bauer Says:

    Hi there,

    Thanks for sharing this…
    Are the two download links off the source page (Flex Trial and source .zip) disabled on intention?

  2. German Bauer Says:

    Works now, thanks again for sharing!

  3. Jools Says:

    Hi Bret,

    I tried this verson as you requested. When used on a macbook pro with trackpad finger tapping enabled (as described in the blog thread for version 1), this new version 2 still exhibits the strange jumping behaviour. As I said before, this behaviour is not unique to your example.

    Jools

  4. Brett Says:

    Thanks for follow up. I can re-create the bug you are seeing. I will chat with the engineering folks and log a bug for this (if it hasn’t already been captured). I will keep you posted to my findings.

  5. Tom Primožič Says:

    There is a little problem with your application: When I type in to search something, if I later change my mind, I cannot select and delete the text using mouse (since clicking the mouse on the TextInput control activates your window-moving function). I haven’t tried to fix it myself, but I just wanted you to know that - it might not be what your users would expect.

    - Tom

  6. Brett Says:

    Tom,

    There is nothing wrong with the application. This is an example of custom chrome in AIR. If you want to take this example and add features and functionality, thats great. So if you would like to add search functionality, I would suggest focusing on what exactly your searching for first. ;)

  7. martin Says:

    Hi Brett
    Great that you share your knowledge…thanks.
    My question might be stupid but i could’nt find a solution via google
    When i try to compile your project in flex builder 3 Win i get the following error:

    unable to open ‘E:\server\xampp\htdocs\fex_workspace\CustomWindow02\libs’

    what is this path for (libs), and where should it link to?
    cheers
    martin

  8. martin Says:

    ok..problem solved..

  9. Mike Says:

    Thanks for making this example available. I’d like to suggest that the maximize button should change to a restore button after the application is maximized. The sample application would also perhaps benefit from the standard Windows keyboard shortcut to minimize a window (Win+M.)

  10. Sean Says:

    I’m doing a presentation on data synchronization at FITC Toronto this year. I’ll definitely be pointing people towards this example as a great example of solid data sync design pattern. Thanks for posting it.

  11. Matt Says:

    Hey, wicked chrome. I used the chrome in a small demo application that I did for a AS3 MySQL driver I am working on. You can check it out here: http://code.google.com/p/assql/

  12. Chris Says:

    Hey, this “version” of air is great. The suggestion of Mike with the rstor button after the application is maximized is a great idea. I find, that that would make this version more perfect than it is. Thanks for posting this version.

  13. araba oyunlari Says:

    thank you very much for chrome

  14. Susann Says:

    Thanks for making this example available. This version is of air great
    Cheers Susann

  15. Paul Says:

    Posts are pretty old but if anybody wants to implement Restore Down functionality, just id your Maximize button (i.e. “maxButton”) and handle it in an AS3 function that you call on the button’s click. Button’s so small that it’ll look fine for both gestures:

    //—————————————————————————–

    private var maximized:Boolean;
    private var winHeight:int;
    private var winWidth:int;
    private var winX:int;
    private var winY:int;

    //—————————————————————————–

    private function handleMaxOrRestore():void
    {
    if(!maximized)
    {
    //Store window’s position and size before maximizing.
    winHeight = stage.nativeWindow.height;
    winWidth = stage.nativeWindow.width;
    winX = stage.nativeWindow.x;
    winY = stage.nativeWindow.y;
    stage.nativeWindow.maximize()
    maximized = true;
    maxButton.toolTip = “Restore Down”
    }
    else
    {
    //Put window back where it was (size and position) before
    //the user maximized.
    stage.nativeWindow.height = winHeight;
    stage.nativeWindow.width = winWidth;
    stage.nativeWindow.x = winX;
    stage.nativeWindow.y = winY;
    maximized = false;
    maxButton.toolTip = “Maximize”
    }
    }

  16. Paul Says:

    Oh… and Kudos on the chrome example Brett!

  17. boyama oyunları Says:

    Thanks

  18. Ben Says:

    Hi can you please create an html and ajax version for adobe air.

    Thanks

Leave a Reply

Comment spam protected by SpamBam