01-22-2013 02:23 PM
Hi,
what's the best method to find out on what device an Air app is running?
(I need to change the button sizes on devices like the dev alpha)
Thanks
Vibes
01-22-2013 03:58 PM
Hello
Check this solution
//start app
public function Main(){
checkDevice();
}
//check stage size
public function checkDevice(){
if(stage.stageWidth == 768 && stage.stageHeight == 1280){
myButton.width = 768; //// Dev Alpha
}
if(stage.stageWidth == 1024 && stage.stageHeight == 600){
myButton.width = 1024; /// Playbook
}
}
01-22-2013 07:32 PM - edited 01-22-2013 07:33 PM
Capabilities.pixelAspectRatio;
Capabilities.screenDPI;
Capabilities.os;
Capabilities.screenResolutionX;
Capabilities.screenResolutionY;
I'm going to assume DPI is probably the best value to look at. the others might be useful too.
Found in:
import flash.system.Capabilities;
01-30-2013 05:05 AM
Is the screenDPI of the BlackBerry10 devices all the same or are they different?
01-30-2013 08:23 AM