How would I go about finding the display size and position of the stage or navigator area in Adobe Flex mobile? I would like to be able to make something the exact width and height (without using 100% w&h). And position the top at the top of the stage. I'm sure this description isn't the easiest to understand, so hopefully this image will help:
protected function init(event:FlexEvent):void
{
if (NativeMaps.isSupported){
NativeMaps.service.addEventListener(Event.ACTIVATE, mapReady2);
//NativeMaps.service.addEventListener(NativeMapEvent.MAP_CREATED, mapReady);
try{
NativeMaps.service.mapOptions.compassEnabled=true;
NativeMaps.service.mapOptions.zoomControlsEnabled = true;
NativeMaps.service.mapOptions.zoomGesturesEnabled = true;
NativeMaps.service.mapOptions.rotateGesturesEnabled = true;
NativeMaps.service.mapOptions.myLocationButtonEnabled = true;
}catch(e:Error){
}
var tla:ViewNavigatorApplication=FlexGlobals.topLevelApplication as ViewNavigatorApplication;
var width:Number = tla.width;
var height:Number = tla.height-tla.actionBar.height;
var x:Number = 0;
var y:Number = tla.actionBar.height;
NativeMaps.service.createMap(width,height,x,y);
}
}