Calculating Taskbar height + Adobe AIR
27 June 2009
2 Comments
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?
Translate this post











































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;
Thanks cappon
Leave your response!
Blog Rating
Average blog rating:
7.3
61 votes cast for 30 posts
Recent Posts
Categories
Recent Comments
Archives
Blogroll
Pages