/ Published in: ActionScript 3

This is taken 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 mmToPixels(mm:Number):uint { return Math.round(Capabilities.screenDPI * (mm / 25.4)); } var myWidthInMillimeters:Number = 38; var myWidthInPixels:uint = mmToPixels(myWidthInMillimeters); trace("myWidthInPixels: "+myWidthInPixels); // OUTPUT // myWidthInPixels: 108
URL: http://www.adobe.com/devnet/flash/articles/authoring_for_multiple_screen_sizes.html
Comments
