Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7978369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:28:37+00:00 2026-06-04T09:28:37+00:00

While accessing information using Capabilities, i am getting incorrect values. var screenX:Number = Capabilities.screenResolutionX;

  • 0

While accessing information using Capabilities, i am getting incorrect values.

var screenX:Number = Capabilities.screenResolutionX;
var screenY:Number = Capabilities.screenResolutionY;
var pixelCheck:Number = screenX * screenY;
var pixels:Number = (screenX*screenX) + (screenY*screenY);
var screenSize:Number = Math.sqrt(pixels)/Capabilities.screenDPI;
var screenDpi:Number = Capabilities.screenDPI;

trace("screenX : " + screenX);
trace("screenY : " + screenY);
trace("pixelCheck : " + pixelCheck);
trace("pixels : " + pixels);
trace("screenSize : " + screenSize);
trace("screenDpi : " + screenDpi);

When i debug this on the flex emulator, for iphone 4, i get the following result.

screenX : 1280
screenY : 1024
pixelCheck : 1310720
pixels : 2686976
screenSize : 5.028220260069967
screenDpi : 326

The Screen dpi is correct, but since iphone has a resolution of 640 X 960, why is it showing different value.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:28:38+00:00Added an answer on June 4, 2026 at 9:28 am

    This is expected behavior. Capabilities class is returning the correct values; which is the screen resolution for the device you’re running it on (aka not an iPhone ).

    You can file a bug report/enhancement request. Or test it on an actual device. Overall I find the emulators to be hit or miss in terms of testing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting this exception while accessing the jax-ws web service from my client.
I am getting an error while accessing the core service on SDL Tridion 2011
I am getting this parser error while accessing the server url Parser Error :
I am getting the warning only while accessing address of element in vector of
While accessing our own website in Java code, an exception is thrown: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException:
I am trying to integrate saleforce with my project. While accessing the url /chatter/feeds/files/me
While using regex to help solve a problem in the Python Challenge , I
I'm using a SQLite database to store information on players and their teams using
I created windows service using csharp in that i am accessing shared folders which
I've been using OpenID for my site for a while, and everything has been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.