Home » AIR, actionscript 3.0, Flash CS4

Calculating Taskbar height + Adobe Air

27 June 2009 No Comment

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?

VN:F [1.7.7_1013]
Rating: 0.0/10 (0 votes cast)
VN:F [1.7.7_1013]
Rating: 0 (from 0 votes)

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.