• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Issue with DPIClassification in Flash Builder

New Here ,
Sep 25, 2019 Sep 25, 2019

Copy link to clipboard

Copied

I've been thrown into Flash Builder at a new job in order to update an old simple application. It will not compile and build a new .swf, which I assume is due to these errors. The code hasn't been touched since 2016 and no one here knows anything about it. I've been researching, but can't seem to find the right guidance if anyone has any ideas for me. 

 

Error 1119: Access of possibly undefined property DPI_120 through a reference with static type Class.

Error 1119: Access of possibly undefined property DPI_480 through a reference with static type Class.

Error 1119: Access of possibly undefined property DPI_640 through a reference with static type Class.

 

override public function get runtimeDPI():Number 
            {
                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;


                if (Capabilities.screenDPI < 140 && isAndroid())  // 140
                {
                    trace("Return 120");
                    return DPIClassification.DPI_120;
                }
                else if (Capabilities.screenDPI < 200)  // 200   // iOS iPad - 132   // iPhone 3GS - 163
                {
                    trace("Return 160");
                    return DPIClassification.DPI_160;
                }
                else if (Capabilities.screenDPI <= 280 && isAndroid())  // 280
                {
                    trace("Return 240");
                    return DPIClassification.DPI_240;
                }
                else if (Capabilities.screenDPI <= 400)  // 400   // iOS iPad Retina - 264   // iPhone 4 - 326   // iPhone 5 - 326   // iPhone 6 - 326
                {
                    trace("Return 320");
                    return DPIClassification.DPI_320;
                }
                else if (Capabilities.screenDPI <= 560)  // 560   // iPhone 6+ - 401
                {
                    trace("Return 480");
                    return DPIClassification.DPI_480;
                }
                else
                {
                    trace("Return 640");
                    return DPIClassification.DPI_640; 
                }

            }

 

Views

115

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 25, 2019 Sep 25, 2019

Copy link to clipboard

Copied

LATEST

Hi,

I moved your question from Community Help to Flash Builder where the concerned experts will see it.

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines