Home » ActionScript 3.0, AIR, Flash CS4

Calculating Taskbar height + Adobe AIR

27 June 2009 2 Comments
Share on Facebook

To create Application alert as in MSN messenger, that happens while a contact signing In. Here we are going to see how to calculate and position an alert window for that we should also calculate the height of Task bar.

That’s not a pretty tough job in Adobe AIR.

var screenBounds:Rectangle = Screen.mainScreen.bounds;

var screenVisibleBounds:Rectangle = Screen.mainScreen.visibleBounds;

var _taskbarHeight:Number = screenBounds.height - screenVisibleBounds;

var _taskbarY:Number = screenBounds.height - _taskbarHeight;

Screen.mainScreen.bounds return the total screen height and width while, Screen.mainScreen.visibleBounds return the visible area other than the taskbar.

With this we can calculate the Taskbar height and place the alert window for the AIR application.

so simple isn’t it?


We don't share your email anywhere, grab our rss via feedburner


  • GovernorOfCarpTown said:

    As Screen.mainScreen.visibleBounds is a Rectangle and has a property called bottom. So you could say that:

    var _taskbarY:Number = Screen.mainScreen.visibleBounds.bottom;

  • admin said:

    Thanks cappon

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.