/ Published in: ActionScript 3

This function is from Christian Cantrell's Adobe article called 'Authoring mobile Flash content for multiple screen sizes'.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function inchesToPixels(inches:Number):uint { return Math.round(Capabilities.screenDPI * inches); } var myWidthInInches:Number = 1.5; var myWidthInPixels:uint = inchesToPixels(myWidthInInches); trace("myWidthInPixels: "+myWidthInPixels); // OUTPUT // myWidthInPixels: 108
URL: http://www.adobe.com/devnet/flash/articles/authoring_for_multiple_screen_sizes.html
Comments
