onClipEvent (enterFrame) {
xres = System.capabilities.screenResolutionX;
yres = System.capabilities.screenResolutionY;
}
You'll notice that there are two functions, assigned to two variables: xres and yres. Flash doesn't actually get the resolution as one value, but instead as two separate values. Let's break down how:
System.capabilities.screenResolutionX: This fetches the width value of the user's screen resolution in pixels. This is a static value that you can't affect; you cannot change the user's resolution, but you can change things in your movie based on the resolution by assigning the value to a variable and using it in various scripts.
System.capabilities.screenResolutionY: This fetches the height value of the user's screen resolution in pixels. Again, you can't change the value itself, but you can assign it to a variable to change various things in your movie.
