1. Home
  2. Computing & Technology
  3. Animation

Using System.capabilities to Determine a User's Screen Size

By Adrien-Luc Sanders, About.com

4 of 4

With the width and height assigned to variables, all that remains is to pass the values to the text field to display them on screen:
onClipEvent (enterFrame) {
xres = System.capabilities.screenResolutionX;
yres = System.capabilities.screenResolutionY;
_root.resdisplay.text = "Your screen resolution is:\n" + xres + " x " yres;
}
Try it out to see if it displays your resolution.
Explore Animation
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. ActionScripting Basics
  6. ActionScripting Basics: Using System.capabilities to Determine a User's Screen Size

©2009 About.com, a part of The New York Times Company.

All rights reserved.