BTA Flexing

My passion RIAs…………..Shardul Singh Bartwal

Moving Adobe AIR Application

Posted by Shardul Singh Bartwal on October 18, 2010

Moving any air application is already provided feature with any air application if you are having title bar with it.
But let suppose you requirement is such that you dont require to show the title window.In that case if you want to
move your window with mouse on the any particular Display object then you can acheive this some thing like this.
Just call two function on that partiuclar display object the one for moving the application and another for stoping this
moving.Like below:-

private function onMouseDown(event : MouseEvent) :void
{
this.stage.nativeWindow.startMove();
}

private function onMouseUp(event : MouseEvent) : void
{
this.stage.nativeWindow.restore();

}

I am using there this word as I m currently inside the WindowedApplication.

Hope you will enjoy this…….

Advertisements

3 Responses to “Moving Adobe AIR Application”

  1. AlphaBlack said

    only with this code ? an event handler or something ? i’m new in Flex and this code in my application doesn’t work.nothing happens

  2. shardulbartwal said

    Yes only with this code. But you have to call these two methods on any particular component via which you want to move you application. Like let suppose you placed a image or button on your application and you want to move by pressing mouse on that then call these two method from that button or image. And also please note that your application should be small in size with respect to you monitor’s resolution other wise you will not have any place to move it……..

    Thnx……..
    ….Shardul

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: