PDA

View Full Version : How to tell screen size??


cannon303
08-22-2006, 02:59 PM
Hi stupid question but say i have a stage of 500px X 500px and i'm using the fscommand to make the projector expand to full size of the users monitor, is there anyway of scripting flash so that it can work out what size the monitor is?

Basically ive got some images that are imported into the flash movie but look bad when the movie is expanded or contracted to a different size to the original. I understand that jpegs can look bad when they are not resized to multiples of itself (100%, 50%, 25%, 12.5%). So what i need to do is use script to basically say

if (monitor == 800x600){ image size is 25%}
if (monitor == 1024x768){image size is 50%} etc etc

I'm sure i can work out the script for the above, i just need to know if flash can somehow tell what monitor size it is working on.

Any ideas?

I always seem to ask stupid questions.....

Kraken
08-22-2006, 03:22 PM
trace("screen width: " + System.capabilities.screenResolutionX);
trace("screen height: " + System.capabilities.screenResolutionY);

cannon303
08-22-2006, 03:40 PM
brilliant thankyou very much and hope you have a wonderful christmas.