You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Deepak MS <me...@gmail.com> on 2015/02/16 05:29:45 UTC

runtimeDPIProvider in mx:Application?

Hello,
Just like retina display ipads, off late, there have been laptops with
higher DPIs. And we have some of our flex 3 applications in which all the
components look too small in overall size on screen in new laptops
(something like the screenshots shown here in this link:
https://forums.adobe.com/thread/977263 )

We can achieve it in flex 4 :
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/RuntimeDPIProvider.html

But I want to know if there is anything I can try to achieve it in flex 3
we applications, as it doesn't have "runtimeDPIProvider" property.

Appreciate your help.

Cheers!

Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Just happened to download FP 18 and looks like this issue has been handled
in that.

On Sun, Mar 8, 2015 at 9:38 PM, Deepak MS <me...@gmail.com> wrote:

> https://bugbase.adobe.com/index.cfm?event=bug&id=3949775
>
>
>
> On Sat, Mar 7, 2015 at 10:48 AM, Deepak MS <me...@gmail.com>
> wrote:
>
>> Thanks Alex. Yes, Ill file it. And hope something shall be done about it.
>> Just like retina display ipads, am sure many users would lean towards
>> retina display laptops too.
>>
>> Cheers!
>> On 5 Mar 2015 12:04, "Alex Harui" <ah...@adobe.com> wrote:
>>
>>> I’m not sure that 1980 counts as a Retina-class display.  IIRC, the
>>> player
>>> has reported 72dpi for desktop screens forever.  I think you can also get
>>> it to report 120dpi in some cases, but I don’t think they’ve tried to
>>> introduce useful screenDensity except on mobile devices.  You can try
>>> filing a bug at bugbase.adobe.com and see what they have to say.  They
>>> could have changed something else recently that I’m unaware of.
>>>
>>> -Alex
>>>
>>>
>>> On 3/3/15, 11:55 PM, "Deepak MS" <me...@gmail.com> wrote:
>>>
>>> >Yes.
>>> >It's just a recommended screen resolution which user can change under
>>> >system's display(shown in image in the link below):
>>> >http://pbrd.co/1M66RiC
>>> >
>>> >If I change the resolution to 1280 x 1024, then
>>> >Capabilities.screenResolutionX and Y give me 1280 and 1024, which are
>>> >correct values. Only problem is the DPI value.
>>> >
>>> >
>>> >On Wed, Mar 4, 2015 at 12:54 PM, Alex Harui <ah...@adobe.com> wrote:
>>> >
>>> >> Is the laptop screen actually 1920 x 1080?
>>> >>
>>> >> On 3/3/15, 10:51 PM, "Deepak MS" <me...@gmail.com> wrote:
>>> >>
>>> >> >Hi Alex,
>>> >> >No luck ;(
>>> >> >
>>> >> >I updated to Flex4.14 FP 16 AIR 16.
>>> >> >
>>> >> >Sample code that I have been trying:
>>> >> >
>>> >> ><?xml version="1.0" encoding="utf-8"?>
>>> >> ><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>>> >> >               xmlns:s="library://ns.adobe.com/flex/spark"
>>> >> >               xmlns:mx="library://ns.adobe.com/flex/mx"
>>> minWidth="955"
>>> >> >minHeight="600"
>>> >> >               runtimeDPIProvider="AppRuntimeDPI"
>>> >> >
>>> >> >creationComplete="application1_creationCompleteHandler(event)">
>>> >> >    <s:layout>
>>> >> >        <s:VerticalLayout/>
>>> >> >    </s:layout>
>>> >> >    <fx:Script>
>>> >> >        <![CDATA[
>>> >> >            import mx.events.FlexEvent;
>>> >> >
>>> >> >            protected function
>>> >> >application1_creationCompleteHandler(event:FlexEvent):void
>>> >> >            {
>>> >> >                ta.text = '';
>>> >> >                ta.text += "Capabilities.screenDPI : "+
>>> >> >Capabilities.screenDPI.toString(); //72 in both normal laptop and HD
>>> >> >laptop
>>> >> >                ta.text += "\nCapabilities.screenResolutionX : "+
>>> >> >Capabilities.screenResolutionX.toString();//1600 in normal laptop and
>>> >>1920
>>> >> >in HD laptop
>>> >> >                ta.text += "\nCapabilities.screenResolutionY : "+
>>> >> >Capabilities.screenResolutionY.toString();//900 in normal laptop and
>>> >>1080
>>> >> >in HD laptop
>>> >> >
>>> >> >            }
>>> >> >
>>> >> >        ]]>
>>> >> >    </fx:Script>
>>> >> >    <s:Button label="Hello"/>
>>> >> >    <s:TextInput/>
>>> >> >    <s:DropDownList/>
>>> >> >    <s:Label text="Hello Label"/>
>>> >> >    <s:NumericStepper />
>>> >> >    <s:TextArea id="ta" width="100%"/>
>>> >> ></s:Application>
>>> >> >
>>> >> >AppRuntimeDPI.as :
>>> >> >
>>> >> >package
>>> >> >{
>>> >> >    import mx.core.DPIClassification;
>>> >> >    import mx.core.RuntimeDPIProvider;
>>> >> >
>>> >> >    public class AppRuntimeDPI extends RuntimeDPIProvider
>>> >> >    {
>>> >> >        public function AppRuntimeDPI()
>>> >> >        {
>>> >> >            //super();
>>> >> >        }
>>> >> >
>>> >> >        override public function get runtimeDPI():Number
>>> >> >        {
>>> >> >// cannot check for this condition too as screenDPI for any
>>> >>laptop(normal
>>> >> >or HD) is returned as 72 always. Moreover, any DPI value that I
>>> assign
>>> >> >here, doesn't have any effect on the screen element sizes. It's
>>> always
>>> >> >same
>>> >> >for all values.
>>> >> >
>>> >> >            // A tablet reporting an incorrect DPI of 240.
>>> >> >            /*if (Capabilities.screenDPI == 240 &&
>>> >> >            Capabilities.screenResolutionX == 600 &&
>>> >> >            Capabilities.screenResolutionY == 1024)
>>> >> >            {
>>> >> >            return DPIClassification.DPI_160;
>>> >> >            }
>>> >> >
>>> >> >            return super.runtimeDPI;*/
>>> >> >            return DPIClassification.DPI_240;
>>> >> >        }
>>> >> >    }
>>> >> >}
>>> >> >
>>> >> >
>>> >> >On Tue, Mar 3, 2015 at 10:30 PM, Deepak MS <megharajdeepak@gmail.com
>>> >
>>> >> >wrote:
>>> >> >
>>> >> >> Hmmm okay. I'll give it a try and let you know. Just hope it works.
>>> >> >> On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:
>>> >> >>
>>> >> >>> Try the latest AIR SDK?
>>> >> >>>
>>> >> >>> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
>>> >> >>>
>>> >> >>> >
>>> >> >>>
>>> >> >>>
>>> >>
>>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/co
>>> >> >>>re
>>> >> >>> >/RuntimeDPIProvider.html
>>> >> >>> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and
>>> I'm
>>> >> >>>afraid
>>> >> >>> >it isn't working as expected. I tried to create a runtime class
>>> and
>>> >> >>>DPI
>>> >> >>> >value was overridden. But still there is no change. All screen
>>> >> >>>elements
>>> >> >>> >look very small than normal.
>>> >> >>> >
>>> >> >>> >Has anybody come across this case on laptops(high DPI\retina
>>> >> >>>display\HD)?
>>> >> >>> >
>>> >> >>> >On iPad retina display, it works out of the box without any
>>> >> >>> >runtimedpiprovider class when I use flex 4.13 but not on this
>>> >>laptop.
>>> >> >>> When
>>> >> >>> >I checked Capabilites.screenDPI, I get the value as 72. Looks
>>> like
>>> >> >>>value
>>> >> >>> >returned isn't correct nor is it getting overridden.
>>> >> >>> >
>>> >> >>> >Any ideas?
>>> >> >>> >
>>> >> >>> >PS: I'm testing this on Dell latitude E7440.
>>> >> >>>
>>> >> >>>
>>> >>
>>> >>
>>>
>>>
>

Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
https://bugbase.adobe.com/index.cfm?event=bug&id=3949775



On Sat, Mar 7, 2015 at 10:48 AM, Deepak MS <me...@gmail.com> wrote:

> Thanks Alex. Yes, Ill file it. And hope something shall be done about it.
> Just like retina display ipads, am sure many users would lean towards
> retina display laptops too.
>
> Cheers!
> On 5 Mar 2015 12:04, "Alex Harui" <ah...@adobe.com> wrote:
>
>> I’m not sure that 1980 counts as a Retina-class display.  IIRC, the player
>> has reported 72dpi for desktop screens forever.  I think you can also get
>> it to report 120dpi in some cases, but I don’t think they’ve tried to
>> introduce useful screenDensity except on mobile devices.  You can try
>> filing a bug at bugbase.adobe.com and see what they have to say.  They
>> could have changed something else recently that I’m unaware of.
>>
>> -Alex
>>
>>
>> On 3/3/15, 11:55 PM, "Deepak MS" <me...@gmail.com> wrote:
>>
>> >Yes.
>> >It's just a recommended screen resolution which user can change under
>> >system's display(shown in image in the link below):
>> >http://pbrd.co/1M66RiC
>> >
>> >If I change the resolution to 1280 x 1024, then
>> >Capabilities.screenResolutionX and Y give me 1280 and 1024, which are
>> >correct values. Only problem is the DPI value.
>> >
>> >
>> >On Wed, Mar 4, 2015 at 12:54 PM, Alex Harui <ah...@adobe.com> wrote:
>> >
>> >> Is the laptop screen actually 1920 x 1080?
>> >>
>> >> On 3/3/15, 10:51 PM, "Deepak MS" <me...@gmail.com> wrote:
>> >>
>> >> >Hi Alex,
>> >> >No luck ;(
>> >> >
>> >> >I updated to Flex4.14 FP 16 AIR 16.
>> >> >
>> >> >Sample code that I have been trying:
>> >> >
>> >> ><?xml version="1.0" encoding="utf-8"?>
>> >> ><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>> >> >               xmlns:s="library://ns.adobe.com/flex/spark"
>> >> >               xmlns:mx="library://ns.adobe.com/flex/mx"
>> minWidth="955"
>> >> >minHeight="600"
>> >> >               runtimeDPIProvider="AppRuntimeDPI"
>> >> >
>> >> >creationComplete="application1_creationCompleteHandler(event)">
>> >> >    <s:layout>
>> >> >        <s:VerticalLayout/>
>> >> >    </s:layout>
>> >> >    <fx:Script>
>> >> >        <![CDATA[
>> >> >            import mx.events.FlexEvent;
>> >> >
>> >> >            protected function
>> >> >application1_creationCompleteHandler(event:FlexEvent):void
>> >> >            {
>> >> >                ta.text = '';
>> >> >                ta.text += "Capabilities.screenDPI : "+
>> >> >Capabilities.screenDPI.toString(); //72 in both normal laptop and HD
>> >> >laptop
>> >> >                ta.text += "\nCapabilities.screenResolutionX : "+
>> >> >Capabilities.screenResolutionX.toString();//1600 in normal laptop and
>> >>1920
>> >> >in HD laptop
>> >> >                ta.text += "\nCapabilities.screenResolutionY : "+
>> >> >Capabilities.screenResolutionY.toString();//900 in normal laptop and
>> >>1080
>> >> >in HD laptop
>> >> >
>> >> >            }
>> >> >
>> >> >        ]]>
>> >> >    </fx:Script>
>> >> >    <s:Button label="Hello"/>
>> >> >    <s:TextInput/>
>> >> >    <s:DropDownList/>
>> >> >    <s:Label text="Hello Label"/>
>> >> >    <s:NumericStepper />
>> >> >    <s:TextArea id="ta" width="100%"/>
>> >> ></s:Application>
>> >> >
>> >> >AppRuntimeDPI.as :
>> >> >
>> >> >package
>> >> >{
>> >> >    import mx.core.DPIClassification;
>> >> >    import mx.core.RuntimeDPIProvider;
>> >> >
>> >> >    public class AppRuntimeDPI extends RuntimeDPIProvider
>> >> >    {
>> >> >        public function AppRuntimeDPI()
>> >> >        {
>> >> >            //super();
>> >> >        }
>> >> >
>> >> >        override public function get runtimeDPI():Number
>> >> >        {
>> >> >// cannot check for this condition too as screenDPI for any
>> >>laptop(normal
>> >> >or HD) is returned as 72 always. Moreover, any DPI value that I assign
>> >> >here, doesn't have any effect on the screen element sizes. It's always
>> >> >same
>> >> >for all values.
>> >> >
>> >> >            // A tablet reporting an incorrect DPI of 240.
>> >> >            /*if (Capabilities.screenDPI == 240 &&
>> >> >            Capabilities.screenResolutionX == 600 &&
>> >> >            Capabilities.screenResolutionY == 1024)
>> >> >            {
>> >> >            return DPIClassification.DPI_160;
>> >> >            }
>> >> >
>> >> >            return super.runtimeDPI;*/
>> >> >            return DPIClassification.DPI_240;
>> >> >        }
>> >> >    }
>> >> >}
>> >> >
>> >> >
>> >> >On Tue, Mar 3, 2015 at 10:30 PM, Deepak MS <me...@gmail.com>
>> >> >wrote:
>> >> >
>> >> >> Hmmm okay. I'll give it a try and let you know. Just hope it works.
>> >> >> On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:
>> >> >>
>> >> >>> Try the latest AIR SDK?
>> >> >>>
>> >> >>> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
>> >> >>>
>> >> >>> >
>> >> >>>
>> >> >>>
>> >>
>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/co
>> >> >>>re
>> >> >>> >/RuntimeDPIProvider.html
>> >> >>> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm
>> >> >>>afraid
>> >> >>> >it isn't working as expected. I tried to create a runtime class
>> and
>> >> >>>DPI
>> >> >>> >value was overridden. But still there is no change. All screen
>> >> >>>elements
>> >> >>> >look very small than normal.
>> >> >>> >
>> >> >>> >Has anybody come across this case on laptops(high DPI\retina
>> >> >>>display\HD)?
>> >> >>> >
>> >> >>> >On iPad retina display, it works out of the box without any
>> >> >>> >runtimedpiprovider class when I use flex 4.13 but not on this
>> >>laptop.
>> >> >>> When
>> >> >>> >I checked Capabilites.screenDPI, I get the value as 72. Looks like
>> >> >>>value
>> >> >>> >returned isn't correct nor is it getting overridden.
>> >> >>> >
>> >> >>> >Any ideas?
>> >> >>> >
>> >> >>> >PS: I'm testing this on Dell latitude E7440.
>> >> >>>
>> >> >>>
>> >>
>> >>
>>
>>

Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Thanks Alex. Yes, Ill file it. And hope something shall be done about it.
Just like retina display ipads, am sure many users would lean towards
retina display laptops too.

Cheers!
On 5 Mar 2015 12:04, "Alex Harui" <ah...@adobe.com> wrote:

> I’m not sure that 1980 counts as a Retina-class display.  IIRC, the player
> has reported 72dpi for desktop screens forever.  I think you can also get
> it to report 120dpi in some cases, but I don’t think they’ve tried to
> introduce useful screenDensity except on mobile devices.  You can try
> filing a bug at bugbase.adobe.com and see what they have to say.  They
> could have changed something else recently that I’m unaware of.
>
> -Alex
>
>
> On 3/3/15, 11:55 PM, "Deepak MS" <me...@gmail.com> wrote:
>
> >Yes.
> >It's just a recommended screen resolution which user can change under
> >system's display(shown in image in the link below):
> >http://pbrd.co/1M66RiC
> >
> >If I change the resolution to 1280 x 1024, then
> >Capabilities.screenResolutionX and Y give me 1280 and 1024, which are
> >correct values. Only problem is the DPI value.
> >
> >
> >On Wed, Mar 4, 2015 at 12:54 PM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> Is the laptop screen actually 1920 x 1080?
> >>
> >> On 3/3/15, 10:51 PM, "Deepak MS" <me...@gmail.com> wrote:
> >>
> >> >Hi Alex,
> >> >No luck ;(
> >> >
> >> >I updated to Flex4.14 FP 16 AIR 16.
> >> >
> >> >Sample code that I have been trying:
> >> >
> >> ><?xml version="1.0" encoding="utf-8"?>
> >> ><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> >> >               xmlns:s="library://ns.adobe.com/flex/spark"
> >> >               xmlns:mx="library://ns.adobe.com/flex/mx"
> minWidth="955"
> >> >minHeight="600"
> >> >               runtimeDPIProvider="AppRuntimeDPI"
> >> >
> >> >creationComplete="application1_creationCompleteHandler(event)">
> >> >    <s:layout>
> >> >        <s:VerticalLayout/>
> >> >    </s:layout>
> >> >    <fx:Script>
> >> >        <![CDATA[
> >> >            import mx.events.FlexEvent;
> >> >
> >> >            protected function
> >> >application1_creationCompleteHandler(event:FlexEvent):void
> >> >            {
> >> >                ta.text = '';
> >> >                ta.text += "Capabilities.screenDPI : "+
> >> >Capabilities.screenDPI.toString(); //72 in both normal laptop and HD
> >> >laptop
> >> >                ta.text += "\nCapabilities.screenResolutionX : "+
> >> >Capabilities.screenResolutionX.toString();//1600 in normal laptop and
> >>1920
> >> >in HD laptop
> >> >                ta.text += "\nCapabilities.screenResolutionY : "+
> >> >Capabilities.screenResolutionY.toString();//900 in normal laptop and
> >>1080
> >> >in HD laptop
> >> >
> >> >            }
> >> >
> >> >        ]]>
> >> >    </fx:Script>
> >> >    <s:Button label="Hello"/>
> >> >    <s:TextInput/>
> >> >    <s:DropDownList/>
> >> >    <s:Label text="Hello Label"/>
> >> >    <s:NumericStepper />
> >> >    <s:TextArea id="ta" width="100%"/>
> >> ></s:Application>
> >> >
> >> >AppRuntimeDPI.as :
> >> >
> >> >package
> >> >{
> >> >    import mx.core.DPIClassification;
> >> >    import mx.core.RuntimeDPIProvider;
> >> >
> >> >    public class AppRuntimeDPI extends RuntimeDPIProvider
> >> >    {
> >> >        public function AppRuntimeDPI()
> >> >        {
> >> >            //super();
> >> >        }
> >> >
> >> >        override public function get runtimeDPI():Number
> >> >        {
> >> >// cannot check for this condition too as screenDPI for any
> >>laptop(normal
> >> >or HD) is returned as 72 always. Moreover, any DPI value that I assign
> >> >here, doesn't have any effect on the screen element sizes. It's always
> >> >same
> >> >for all values.
> >> >
> >> >            // A tablet reporting an incorrect DPI of 240.
> >> >            /*if (Capabilities.screenDPI == 240 &&
> >> >            Capabilities.screenResolutionX == 600 &&
> >> >            Capabilities.screenResolutionY == 1024)
> >> >            {
> >> >            return DPIClassification.DPI_160;
> >> >            }
> >> >
> >> >            return super.runtimeDPI;*/
> >> >            return DPIClassification.DPI_240;
> >> >        }
> >> >    }
> >> >}
> >> >
> >> >
> >> >On Tue, Mar 3, 2015 at 10:30 PM, Deepak MS <me...@gmail.com>
> >> >wrote:
> >> >
> >> >> Hmmm okay. I'll give it a try and let you know. Just hope it works.
> >> >> On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:
> >> >>
> >> >>> Try the latest AIR SDK?
> >> >>>
> >> >>> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
> >> >>>
> >> >>> >
> >> >>>
> >> >>>
> >>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/co
> >> >>>re
> >> >>> >/RuntimeDPIProvider.html
> >> >>> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm
> >> >>>afraid
> >> >>> >it isn't working as expected. I tried to create a runtime class and
> >> >>>DPI
> >> >>> >value was overridden. But still there is no change. All screen
> >> >>>elements
> >> >>> >look very small than normal.
> >> >>> >
> >> >>> >Has anybody come across this case on laptops(high DPI\retina
> >> >>>display\HD)?
> >> >>> >
> >> >>> >On iPad retina display, it works out of the box without any
> >> >>> >runtimedpiprovider class when I use flex 4.13 but not on this
> >>laptop.
> >> >>> When
> >> >>> >I checked Capabilites.screenDPI, I get the value as 72. Looks like
> >> >>>value
> >> >>> >returned isn't correct nor is it getting overridden.
> >> >>> >
> >> >>> >Any ideas?
> >> >>> >
> >> >>> >PS: I'm testing this on Dell latitude E7440.
> >> >>>
> >> >>>
> >>
> >>
>
>

Re: runtimeDPIProvider in mx:Application?

Posted by Alex Harui <ah...@adobe.com>.
I’m not sure that 1980 counts as a Retina-class display.  IIRC, the player
has reported 72dpi for desktop screens forever.  I think you can also get
it to report 120dpi in some cases, but I don’t think they’ve tried to
introduce useful screenDensity except on mobile devices.  You can try
filing a bug at bugbase.adobe.com and see what they have to say.  They
could have changed something else recently that I’m unaware of.

-Alex


On 3/3/15, 11:55 PM, "Deepak MS" <me...@gmail.com> wrote:

>Yes.
>It's just a recommended screen resolution which user can change under
>system's display(shown in image in the link below):
>http://pbrd.co/1M66RiC
>
>If I change the resolution to 1280 x 1024, then
>Capabilities.screenResolutionX and Y give me 1280 and 1024, which are
>correct values. Only problem is the DPI value.
>
>
>On Wed, Mar 4, 2015 at 12:54 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> Is the laptop screen actually 1920 x 1080?
>>
>> On 3/3/15, 10:51 PM, "Deepak MS" <me...@gmail.com> wrote:
>>
>> >Hi Alex,
>> >No luck ;(
>> >
>> >I updated to Flex4.14 FP 16 AIR 16.
>> >
>> >Sample code that I have been trying:
>> >
>> ><?xml version="1.0" encoding="utf-8"?>
>> ><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>> >               xmlns:s="library://ns.adobe.com/flex/spark"
>> >               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
>> >minHeight="600"
>> >               runtimeDPIProvider="AppRuntimeDPI"
>> >
>> >creationComplete="application1_creationCompleteHandler(event)">
>> >    <s:layout>
>> >        <s:VerticalLayout/>
>> >    </s:layout>
>> >    <fx:Script>
>> >        <![CDATA[
>> >            import mx.events.FlexEvent;
>> >
>> >            protected function
>> >application1_creationCompleteHandler(event:FlexEvent):void
>> >            {
>> >                ta.text = '';
>> >                ta.text += "Capabilities.screenDPI : "+
>> >Capabilities.screenDPI.toString(); //72 in both normal laptop and HD
>> >laptop
>> >                ta.text += "\nCapabilities.screenResolutionX : "+
>> >Capabilities.screenResolutionX.toString();//1600 in normal laptop and
>>1920
>> >in HD laptop
>> >                ta.text += "\nCapabilities.screenResolutionY : "+
>> >Capabilities.screenResolutionY.toString();//900 in normal laptop and
>>1080
>> >in HD laptop
>> >
>> >            }
>> >
>> >        ]]>
>> >    </fx:Script>
>> >    <s:Button label="Hello"/>
>> >    <s:TextInput/>
>> >    <s:DropDownList/>
>> >    <s:Label text="Hello Label"/>
>> >    <s:NumericStepper />
>> >    <s:TextArea id="ta" width="100%"/>
>> ></s:Application>
>> >
>> >AppRuntimeDPI.as :
>> >
>> >package
>> >{
>> >    import mx.core.DPIClassification;
>> >    import mx.core.RuntimeDPIProvider;
>> >
>> >    public class AppRuntimeDPI extends RuntimeDPIProvider
>> >    {
>> >        public function AppRuntimeDPI()
>> >        {
>> >            //super();
>> >        }
>> >
>> >        override public function get runtimeDPI():Number
>> >        {
>> >// cannot check for this condition too as screenDPI for any
>>laptop(normal
>> >or HD) is returned as 72 always. Moreover, any DPI value that I assign
>> >here, doesn't have any effect on the screen element sizes. It's always
>> >same
>> >for all values.
>> >
>> >            // A tablet reporting an incorrect DPI of 240.
>> >            /*if (Capabilities.screenDPI == 240 &&
>> >            Capabilities.screenResolutionX == 600 &&
>> >            Capabilities.screenResolutionY == 1024)
>> >            {
>> >            return DPIClassification.DPI_160;
>> >            }
>> >
>> >            return super.runtimeDPI;*/
>> >            return DPIClassification.DPI_240;
>> >        }
>> >    }
>> >}
>> >
>> >
>> >On Tue, Mar 3, 2015 at 10:30 PM, Deepak MS <me...@gmail.com>
>> >wrote:
>> >
>> >> Hmmm okay. I'll give it a try and let you know. Just hope it works.
>> >> On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:
>> >>
>> >>> Try the latest AIR SDK?
>> >>>
>> >>> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
>> >>>
>> >>> >
>> >>>
>> >>>
>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/co
>> >>>re
>> >>> >/RuntimeDPIProvider.html
>> >>> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm
>> >>>afraid
>> >>> >it isn't working as expected. I tried to create a runtime class and
>> >>>DPI
>> >>> >value was overridden. But still there is no change. All screen
>> >>>elements
>> >>> >look very small than normal.
>> >>> >
>> >>> >Has anybody come across this case on laptops(high DPI\retina
>> >>>display\HD)?
>> >>> >
>> >>> >On iPad retina display, it works out of the box without any
>> >>> >runtimedpiprovider class when I use flex 4.13 but not on this
>>laptop.
>> >>> When
>> >>> >I checked Capabilites.screenDPI, I get the value as 72. Looks like
>> >>>value
>> >>> >returned isn't correct nor is it getting overridden.
>> >>> >
>> >>> >Any ideas?
>> >>> >
>> >>> >PS: I'm testing this on Dell latitude E7440.
>> >>>
>> >>>
>>
>>


Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Yes.
It's just a recommended screen resolution which user can change under
system's display(shown in image in the link below):
http://pbrd.co/1M66RiC

If I change the resolution to 1280 x 1024, then
Capabilities.screenResolutionX and Y give me 1280 and 1024, which are
correct values. Only problem is the DPI value.


On Wed, Mar 4, 2015 at 12:54 PM, Alex Harui <ah...@adobe.com> wrote:

> Is the laptop screen actually 1920 x 1080?
>
> On 3/3/15, 10:51 PM, "Deepak MS" <me...@gmail.com> wrote:
>
> >Hi Alex,
> >No luck ;(
> >
> >I updated to Flex4.14 FP 16 AIR 16.
> >
> >Sample code that I have been trying:
> >
> ><?xml version="1.0" encoding="utf-8"?>
> ><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> >               xmlns:s="library://ns.adobe.com/flex/spark"
> >               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
> >minHeight="600"
> >               runtimeDPIProvider="AppRuntimeDPI"
> >
> >creationComplete="application1_creationCompleteHandler(event)">
> >    <s:layout>
> >        <s:VerticalLayout/>
> >    </s:layout>
> >    <fx:Script>
> >        <![CDATA[
> >            import mx.events.FlexEvent;
> >
> >            protected function
> >application1_creationCompleteHandler(event:FlexEvent):void
> >            {
> >                ta.text = '';
> >                ta.text += "Capabilities.screenDPI : "+
> >Capabilities.screenDPI.toString(); //72 in both normal laptop and HD
> >laptop
> >                ta.text += "\nCapabilities.screenResolutionX : "+
> >Capabilities.screenResolutionX.toString();//1600 in normal laptop and 1920
> >in HD laptop
> >                ta.text += "\nCapabilities.screenResolutionY : "+
> >Capabilities.screenResolutionY.toString();//900 in normal laptop and 1080
> >in HD laptop
> >
> >            }
> >
> >        ]]>
> >    </fx:Script>
> >    <s:Button label="Hello"/>
> >    <s:TextInput/>
> >    <s:DropDownList/>
> >    <s:Label text="Hello Label"/>
> >    <s:NumericStepper />
> >    <s:TextArea id="ta" width="100%"/>
> ></s:Application>
> >
> >AppRuntimeDPI.as :
> >
> >package
> >{
> >    import mx.core.DPIClassification;
> >    import mx.core.RuntimeDPIProvider;
> >
> >    public class AppRuntimeDPI extends RuntimeDPIProvider
> >    {
> >        public function AppRuntimeDPI()
> >        {
> >            //super();
> >        }
> >
> >        override public function get runtimeDPI():Number
> >        {
> >// cannot check for this condition too as screenDPI for any laptop(normal
> >or HD) is returned as 72 always. Moreover, any DPI value that I assign
> >here, doesn't have any effect on the screen element sizes. It's always
> >same
> >for all values.
> >
> >            // A tablet reporting an incorrect DPI of 240.
> >            /*if (Capabilities.screenDPI == 240 &&
> >            Capabilities.screenResolutionX == 600 &&
> >            Capabilities.screenResolutionY == 1024)
> >            {
> >            return DPIClassification.DPI_160;
> >            }
> >
> >            return super.runtimeDPI;*/
> >            return DPIClassification.DPI_240;
> >        }
> >    }
> >}
> >
> >
> >On Tue, Mar 3, 2015 at 10:30 PM, Deepak MS <me...@gmail.com>
> >wrote:
> >
> >> Hmmm okay. I'll give it a try and let you know. Just hope it works.
> >> On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:
> >>
> >>> Try the latest AIR SDK?
> >>>
> >>> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
> >>>
> >>> >
> >>>
> >>>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/co
> >>>re
> >>> >/RuntimeDPIProvider.html
> >>> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm
> >>>afraid
> >>> >it isn't working as expected. I tried to create a runtime class and
> >>>DPI
> >>> >value was overridden. But still there is no change. All screen
> >>>elements
> >>> >look very small than normal.
> >>> >
> >>> >Has anybody come across this case on laptops(high DPI\retina
> >>>display\HD)?
> >>> >
> >>> >On iPad retina display, it works out of the box without any
> >>> >runtimedpiprovider class when I use flex 4.13 but not on this laptop.
> >>> When
> >>> >I checked Capabilites.screenDPI, I get the value as 72. Looks like
> >>>value
> >>> >returned isn't correct nor is it getting overridden.
> >>> >
> >>> >Any ideas?
> >>> >
> >>> >PS: I'm testing this on Dell latitude E7440.
> >>>
> >>>
>
>

Re: runtimeDPIProvider in mx:Application?

Posted by Alex Harui <ah...@adobe.com>.
Is the laptop screen actually 1920 x 1080?

On 3/3/15, 10:51 PM, "Deepak MS" <me...@gmail.com> wrote:

>Hi Alex,
>No luck ;(
>
>I updated to Flex4.14 FP 16 AIR 16.
>
>Sample code that I have been trying:
>
><?xml version="1.0" encoding="utf-8"?>
><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>               xmlns:s="library://ns.adobe.com/flex/spark"
>               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
>minHeight="600"
>               runtimeDPIProvider="AppRuntimeDPI"
>
>creationComplete="application1_creationCompleteHandler(event)">
>    <s:layout>
>        <s:VerticalLayout/>
>    </s:layout>
>    <fx:Script>
>        <![CDATA[
>            import mx.events.FlexEvent;
>
>            protected function
>application1_creationCompleteHandler(event:FlexEvent):void
>            {
>                ta.text = '';
>                ta.text += "Capabilities.screenDPI : "+
>Capabilities.screenDPI.toString(); //72 in both normal laptop and HD
>laptop
>                ta.text += "\nCapabilities.screenResolutionX : "+
>Capabilities.screenResolutionX.toString();//1600 in normal laptop and 1920
>in HD laptop
>                ta.text += "\nCapabilities.screenResolutionY : "+
>Capabilities.screenResolutionY.toString();//900 in normal laptop and 1080
>in HD laptop
>
>            }
>
>        ]]>
>    </fx:Script>
>    <s:Button label="Hello"/>
>    <s:TextInput/>
>    <s:DropDownList/>
>    <s:Label text="Hello Label"/>
>    <s:NumericStepper />
>    <s:TextArea id="ta" width="100%"/>
></s:Application>
>
>AppRuntimeDPI.as :
>
>package
>{
>    import mx.core.DPIClassification;
>    import mx.core.RuntimeDPIProvider;
>
>    public class AppRuntimeDPI extends RuntimeDPIProvider
>    {
>        public function AppRuntimeDPI()
>        {
>            //super();
>        }
>
>        override public function get runtimeDPI():Number
>        {
>// cannot check for this condition too as screenDPI for any laptop(normal
>or HD) is returned as 72 always. Moreover, any DPI value that I assign
>here, doesn't have any effect on the screen element sizes. It's always
>same
>for all values.
>
>            // A tablet reporting an incorrect DPI of 240.
>            /*if (Capabilities.screenDPI == 240 &&
>            Capabilities.screenResolutionX == 600 &&
>            Capabilities.screenResolutionY == 1024)
>            {
>            return DPIClassification.DPI_160;
>            }
>
>            return super.runtimeDPI;*/
>            return DPIClassification.DPI_240;
>        }
>    }
>}
>
>
>On Tue, Mar 3, 2015 at 10:30 PM, Deepak MS <me...@gmail.com>
>wrote:
>
>> Hmmm okay. I'll give it a try and let you know. Just hope it works.
>> On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:
>>
>>> Try the latest AIR SDK?
>>>
>>> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
>>>
>>> >
>>> 
>>>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/co
>>>re
>>> >/RuntimeDPIProvider.html
>>> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm
>>>afraid
>>> >it isn't working as expected. I tried to create a runtime class and
>>>DPI
>>> >value was overridden. But still there is no change. All screen
>>>elements
>>> >look very small than normal.
>>> >
>>> >Has anybody come across this case on laptops(high DPI\retina
>>>display\HD)?
>>> >
>>> >On iPad retina display, it works out of the box without any
>>> >runtimedpiprovider class when I use flex 4.13 but not on this laptop.
>>> When
>>> >I checked Capabilites.screenDPI, I get the value as 72. Looks like
>>>value
>>> >returned isn't correct nor is it getting overridden.
>>> >
>>> >Any ideas?
>>> >
>>> >PS: I'm testing this on Dell latitude E7440.
>>>
>>>


Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Hi Alex,
No luck ;(

I updated to Flex4.14 FP 16 AIR 16.

Sample code that I have been trying:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
minHeight="600"
               runtimeDPIProvider="AppRuntimeDPI"

creationComplete="application1_creationCompleteHandler(event)">
    <s:layout>
        <s:VerticalLayout/>
    </s:layout>
    <fx:Script>
        <![CDATA[
            import mx.events.FlexEvent;

            protected function
application1_creationCompleteHandler(event:FlexEvent):void
            {
                ta.text = '';
                ta.text += "Capabilities.screenDPI : "+
Capabilities.screenDPI.toString(); //72 in both normal laptop and HD laptop
                ta.text += "\nCapabilities.screenResolutionX : "+
Capabilities.screenResolutionX.toString();//1600 in normal laptop and 1920
in HD laptop
                ta.text += "\nCapabilities.screenResolutionY : "+
Capabilities.screenResolutionY.toString();//900 in normal laptop and 1080
in HD laptop

            }

        ]]>
    </fx:Script>
    <s:Button label="Hello"/>
    <s:TextInput/>
    <s:DropDownList/>
    <s:Label text="Hello Label"/>
    <s:NumericStepper />
    <s:TextArea id="ta" width="100%"/>
</s:Application>

AppRuntimeDPI.as :

package
{
    import mx.core.DPIClassification;
    import mx.core.RuntimeDPIProvider;

    public class AppRuntimeDPI extends RuntimeDPIProvider
    {
        public function AppRuntimeDPI()
        {
            //super();
        }

        override public function get runtimeDPI():Number
        {
// cannot check for this condition too as screenDPI for any laptop(normal
or HD) is returned as 72 always. Moreover, any DPI value that I assign
here, doesn't have any effect on the screen element sizes. It's always same
for all values.

            // A tablet reporting an incorrect DPI of 240.
            /*if (Capabilities.screenDPI == 240 &&
            Capabilities.screenResolutionX == 600 &&
            Capabilities.screenResolutionY == 1024)
            {
            return DPIClassification.DPI_160;
            }

            return super.runtimeDPI;*/
            return DPIClassification.DPI_240;
        }
    }
}


On Tue, Mar 3, 2015 at 10:30 PM, Deepak MS <me...@gmail.com> wrote:

> Hmmm okay. I'll give it a try and let you know. Just hope it works.
> On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:
>
>> Try the latest AIR SDK?
>>
>> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
>>
>> >
>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core
>> >/RuntimeDPIProvider.html
>> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm afraid
>> >it isn't working as expected. I tried to create a runtime class and DPI
>> >value was overridden. But still there is no change. All screen elements
>> >look very small than normal.
>> >
>> >Has anybody come across this case on laptops(high DPI\retina display\HD)?
>> >
>> >On iPad retina display, it works out of the box without any
>> >runtimedpiprovider class when I use flex 4.13 but not on this laptop.
>> When
>> >I checked Capabilites.screenDPI, I get the value as 72. Looks like value
>> >returned isn't correct nor is it getting overridden.
>> >
>> >Any ideas?
>> >
>> >PS: I'm testing this on Dell latitude E7440.
>>
>>

Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Hmmm okay. I'll give it a try and let you know. Just hope it works.
On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:

> Try the latest AIR SDK?
>
> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
>
> >
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core
> >/RuntimeDPIProvider.html
> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm afraid
> >it isn't working as expected. I tried to create a runtime class and DPI
> >value was overridden. But still there is no change. All screen elements
> >look very small than normal.
> >
> >Has anybody come across this case on laptops(high DPI\retina display\HD)?
> >
> >On iPad retina display, it works out of the box without any
> >runtimedpiprovider class when I use flex 4.13 but not on this laptop. When
> >I checked Capabilites.screenDPI, I get the value as 72. Looks like value
> >returned isn't correct nor is it getting overridden.
> >
> >Any ideas?
> >
> >PS: I'm testing this on Dell latitude E7440.
>
>

Re: runtimeDPIProvider in mx:Application?

Posted by Alex Harui <ah...@adobe.com>.
Try the latest AIR SDK?

On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:

>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core
>/RuntimeDPIProvider.html
>I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm afraid
>it isn't working as expected. I tried to create a runtime class and DPI
>value was overridden. But still there is no change. All screen elements
>look very small than normal.
>
>Has anybody come across this case on laptops(high DPI\retina display\HD)?
>
>On iPad retina display, it works out of the box without any
>runtimedpiprovider class when I use flex 4.13 but not on this laptop. When
>I checked Capabilites.screenDPI, I get the value as 72. Looks like value
>returned isn't correct nor is it getting overridden.
>
>Any ideas?
>
>PS: I'm testing this on Dell latitude E7440.


Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/RuntimeDPIProvider.html
I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm afraid
it isn't working as expected. I tried to create a runtime class and DPI
value was overridden. But still there is no change. All screen elements
look very small than normal.

Has anybody come across this case on laptops(high DPI\retina display\HD)?

On iPad retina display, it works out of the box without any
runtimedpiprovider class when I use flex 4.13 but not on this laptop. When
I checked Capabilites.screenDPI, I get the value as 72. Looks like value
returned isn't correct nor is it getting overridden.

Any ideas?

PS: I'm testing this on Dell latitude E7440.

Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Oops! Yes, popup is still small in size. Dropdowns look fine. I'll check
that out. Thanks again.

On Tue, Feb 17, 2015 at 3:41 AM, Alex Harui <ah...@adobe.com> wrote:

> If you just used scaleX, then I think you are scaling the Application,
> which could mean that popups, drop downs, cursors and tooltips won’t
> scale.  systemManager.scaleX should cover that, and yes stage.scaleX isn’t
> supported, you can use scaleMode instead.
>
> -Alex
>
> On 2/16/15, 1:23 AM, "Deepak MS" <me...@gmail.com> wrote:
>
> >Instead of stage.scaleX i used just scaleX (core application's scaleX) and
> >it worked well.
> >
> >Based on Capabilities.screenResolutionX\Y values, I'll customly scale the
> >application's scaleX\Y.
> >
> >Thanks Om and Alex.
> >
> >On Mon, Feb 16, 2015 at 2:17 PM, Deepak MS <me...@gmail.com>
> >wrote:
> >
> >> Ok. I thought scaleX\Y would work.
> >>
> >> But when I try to set the scaleX\Y value, I'm getting error:
> >> //systemManager.stage.scaleMode = StageScaleMode.NO_SCALE;
> >>                 systemManager.stage.scaleX = 1.25;
> >>                 systemManager.stage.scaleY = 1.25;
> >>
> >> Error: Error #2071: The Stage class does not implement this property or
> >> method.
> >>     at Error$/throwError()
> >>     at flash.display::Stage/set scaleX()
> >>     at
> >>
> >>App/onCreationComplete()[C:\Users\deepakms\Documents\FlexProjectsWorkspac
> >>es\NewProjectSpace\IMD\src\App.mxml:76]
> >>     at
> >>
> >>App/___App_Application1_creationComplete()[C:\Users\deepakms\Documents\Fl
> >>exProjectsWorkspaces\NewProjectSpace\IMD\src\App.mxml:13]
> >>     at flash.events::EventDispatcher/dispatchEventFunction()
> >>     at flash.events::EventDispatcher/dispatchEvent()
> >>     at
> >>
> >>mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.x\frameworks\projects
> >>\framework\src\mx\core\UIComponent.as:9590]
> >>     at mx.core::UIComponent/set
> >>
> >>initialized()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\
> >>UIComponent.as:1175]
> >>     at
> >>
> >>mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.x\frame
> >>works\projects\framework\src\mx\managers\LayoutManager.as:718]
> >>     at Function/http://adobe.com/AS3/2006/builtin::apply()
> >>     at
> >>
> >>mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.x\frameworks\p
> >>rojects\framework\src\mx\core\UIComponent.as:8892]
> >>     at
> >>
> >>mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.x\frameworks\pr
> >>ojects\framework\src\mx\core\UIComponent.as:8832]
> >>
> >>
> >> What does runtimeDPIProvider in flex 4 internally do? I couldn't get
> >>much
> >> details on it, as you said, I believe it's about scaling ultimately.
> >>May be
> >> I can try to replicate that in flex 3 application?
> >>
> >>
> >>
> >> On Mon, Feb 16, 2015 at 1:05 PM, Alex Harui <ah...@adobe.com> wrote:
> >>
> >>> Flex defaults to NO_SCALE.
> >>>
> >>> In Flex, the SystemManager is the root.  You can play with setting
> >>> systemManager.scaleX and systemManager.scaleY.
> >>>
> >>> IIRC, there are several factors to controlling stage scale:  the SWF
> >>> dimensions stored in the SWF header and set in the MXML application tag
> >>> and the actual size of the window.  In AIR, you can control the size of
> >>> the window from code  AIR also has the requestedDisplayResolution
> >>> descriptor tag.
> >>>
> >>> If the SWF size matches the Window size it should scale more
> >>>predictably.
> >>> I haven’t tried it with AIR and Retina.
> >>>
> >>> https://blogs.adobe.com/aharui/2008/01/flex_and_scalemodes.html
> >>>
> >>> On 2/15/15, 11:03 PM, "Deepak MS" <me...@gmail.com> wrote:
> >>>
> >>> >Hi Alex,
> >>> >Just looked at it.
> >>> >
> >>> >There are 4 different values it can take. I tried all 4:
> >>> >EXACT_FIT
> >>> ><
> >>>
> >>>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash
> >>>/
> >>> >display/StageScaleMode.html#EXACT_FIT>
> >>> >NO_BORDER
> >>> ><
> >>>
> >>>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash
> >>>/
> >>> >display/StageScaleMode.html#NO_BORDER>
> >>> >SHOW_ALL
> >>> ><
> >>>
> >>>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash
> >>>/
> >>> >display/StageScaleMode.html#SHOW_ALL>
> >>> >All the 3 options above zoom the application upto 400%! (components
> >>>are
> >>> >scaled up way too big)
> >>> >
> >>> >Then I tried NO_SCALE
> >>> ><
> >>>
> >>>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash
> >>>/
> >>> >display/StageScaleMode.html#NO_SCALE>.
> >>> >This doesn't change anything. It stays as is(components size look
> >>>quite
> >>> >small).
> >>> >
> >>> >I came across this link:
> >>> >
> >>>
> >>>
> http://stackoverflow.com/questions/23242855/using-stage-scalemode-stages
> >>>ca
> >>> >lemode-show-all-how-to-determine-current-zoom-per
> >>> >
> >>> >Someone has mentioned this there:
> >>> >"Finally, I accomplished the same by alternative way. I instead of
> >>>using,
> >>> >stage.scaleMode = StageScaleMode.SHOW_ALL, used stage.scaleMode =
> >>> >StageScaleMode.NO_SCALE and manually scaled the root to achieve zoom.
> >>> >Doing
> >>> >this, I now have zoomlevel known :). Hope this helps anyone with
> >>>similar
> >>> >problem."
> >>> >
> >>> >I'm not sure what 'manually scaled the root' meant there. Any idea?
> >>> >
> >>> >On Mon, Feb 16, 2015 at 11:50 AM, Alex Harui <ah...@adobe.com>
> wrote:
> >>> >
> >>> >> Have you tried using Stage.scaleMode?
> >>> >>
> >>> >> On 2/15/15, 9:01 PM, "Deepak MS" <me...@gmail.com> wrote:
> >>> >>
> >>> >> >Hi Om,
> >>> >> >Yes, Capabilities.screenDPI is there, but how do I set the DPI
> >>>value
> >>> >>for
> >>> >> >the application?
> >>> >> >
> >>> >> >I tried a trace:
> >>> >> >trace(Capabilities.screenDPI.toString());
> >>> >> >                trace(Capabilities.screenResolutionX.toString());
> >>> >> >                trace(Capabilities.screenResolutionY.toString());
> >>> >> >
> >>> >> >In old laptop this is what I got:
> >>> >> >72
> >>> >> >1600
> >>> >> >900
> >>> >> >
> >>> >> >In new laptop:
> >>> >> >72
> >>> >> >1920
> >>> >> >1080
> >>> >> >
> >>> >> >Based on screenResolutionX\Y, I need to override the DPI value of
> >>>the
> >>> >> >application. Where can I do that part?
> >>> >> >
> >>> >> >On Mon, Feb 16, 2015 at 10:04 AM, OmPrakash Muppirala
> >>> >> ><bi...@gmail.com>
> >>> >> >wrote:
> >>> >> >
> >>> >> >> Have you tried Capabilities.screenDPI ?  It should be available
> >>>in
> >>> mx
> >>> >> >> applications as well.
> >>> >> >>
> >>> >> >> Thanks,
> >>> >> >> Om
> >>> >> >>
> >>> >> >> On Sun, Feb 15, 2015 at 8:29 PM, Deepak MS <
> >>> megharajdeepak@gmail.com>
> >>> >> >> wrote:
> >>> >> >>
> >>> >> >> > Hello,
> >>> >> >> > Just like retina display ipads, off late, there have been
> >>>laptops
> >>> >>with
> >>> >> >> > higher DPIs. And we have some of our flex 3 applications in
> >>>which
> >>> >>all
> >>> >> >>the
> >>> >> >> > components look too small in overall size on screen in new
> >>>laptops
> >>> >> >> > (something like the screenshots shown here in this link:
> >>> >> >> > https://forums.adobe.com/thread/977263 )
> >>> >> >> >
> >>> >> >> > We can achieve it in flex 4 :
> >>> >> >> >
> >>> >> >> >
> >>> >> >>
> >>> >> >>
> >>> >>
> >>> >>
> >>>
> >>>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/co
> >>>r
> >>> >> >>e/RuntimeDPIProvider.html
> >>> >> >> >
> >>> >> >> > But I want to know if there is anything I can try to achieve
> >>>it in
> >>> >> >>flex 3
> >>> >> >> > we applications, as it doesn't have "runtimeDPIProvider"
> >>>property.
> >>> >> >> >
> >>> >> >> > Appreciate your help.
> >>> >> >> >
> >>> >> >> > Cheers!
> >>> >> >> >
> >>> >> >>
> >>> >>
> >>> >>
> >>>
> >>>
> >>
>
>

Re: runtimeDPIProvider in mx:Application?

Posted by Alex Harui <ah...@adobe.com>.
If you just used scaleX, then I think you are scaling the Application,
which could mean that popups, drop downs, cursors and tooltips won’t
scale.  systemManager.scaleX should cover that, and yes stage.scaleX isn’t
supported, you can use scaleMode instead.

-Alex

On 2/16/15, 1:23 AM, "Deepak MS" <me...@gmail.com> wrote:

>Instead of stage.scaleX i used just scaleX (core application's scaleX) and
>it worked well.
>
>Based on Capabilities.screenResolutionX\Y values, I'll customly scale the
>application's scaleX\Y.
>
>Thanks Om and Alex.
>
>On Mon, Feb 16, 2015 at 2:17 PM, Deepak MS <me...@gmail.com>
>wrote:
>
>> Ok. I thought scaleX\Y would work.
>>
>> But when I try to set the scaleX\Y value, I'm getting error:
>> //systemManager.stage.scaleMode = StageScaleMode.NO_SCALE;
>>                 systemManager.stage.scaleX = 1.25;
>>                 systemManager.stage.scaleY = 1.25;
>>
>> Error: Error #2071: The Stage class does not implement this property or
>> method.
>>     at Error$/throwError()
>>     at flash.display::Stage/set scaleX()
>>     at
>> 
>>App/onCreationComplete()[C:\Users\deepakms\Documents\FlexProjectsWorkspac
>>es\NewProjectSpace\IMD\src\App.mxml:76]
>>     at
>> 
>>App/___App_Application1_creationComplete()[C:\Users\deepakms\Documents\Fl
>>exProjectsWorkspaces\NewProjectSpace\IMD\src\App.mxml:13]
>>     at flash.events::EventDispatcher/dispatchEventFunction()
>>     at flash.events::EventDispatcher/dispatchEvent()
>>     at
>> 
>>mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.x\frameworks\projects
>>\framework\src\mx\core\UIComponent.as:9590]
>>     at mx.core::UIComponent/set
>> 
>>initialized()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\
>>UIComponent.as:1175]
>>     at
>> 
>>mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.x\frame
>>works\projects\framework\src\mx\managers\LayoutManager.as:718]
>>     at Function/http://adobe.com/AS3/2006/builtin::apply()
>>     at
>> 
>>mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.x\frameworks\p
>>rojects\framework\src\mx\core\UIComponent.as:8892]
>>     at
>> 
>>mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.x\frameworks\pr
>>ojects\framework\src\mx\core\UIComponent.as:8832]
>>
>>
>> What does runtimeDPIProvider in flex 4 internally do? I couldn't get
>>much
>> details on it, as you said, I believe it's about scaling ultimately.
>>May be
>> I can try to replicate that in flex 3 application?
>>
>>
>>
>> On Mon, Feb 16, 2015 at 1:05 PM, Alex Harui <ah...@adobe.com> wrote:
>>
>>> Flex defaults to NO_SCALE.
>>>
>>> In Flex, the SystemManager is the root.  You can play with setting
>>> systemManager.scaleX and systemManager.scaleY.
>>>
>>> IIRC, there are several factors to controlling stage scale:  the SWF
>>> dimensions stored in the SWF header and set in the MXML application tag
>>> and the actual size of the window.  In AIR, you can control the size of
>>> the window from code  AIR also has the requestedDisplayResolution
>>> descriptor tag.
>>>
>>> If the SWF size matches the Window size it should scale more
>>>predictably.
>>> I haven’t tried it with AIR and Retina.
>>>
>>> https://blogs.adobe.com/aharui/2008/01/flex_and_scalemodes.html
>>>
>>> On 2/15/15, 11:03 PM, "Deepak MS" <me...@gmail.com> wrote:
>>>
>>> >Hi Alex,
>>> >Just looked at it.
>>> >
>>> >There are 4 different values it can take. I tried all 4:
>>> >EXACT_FIT
>>> ><
>>> 
>>>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash
>>>/
>>> >display/StageScaleMode.html#EXACT_FIT>
>>> >NO_BORDER
>>> ><
>>> 
>>>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash
>>>/
>>> >display/StageScaleMode.html#NO_BORDER>
>>> >SHOW_ALL
>>> ><
>>> 
>>>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash
>>>/
>>> >display/StageScaleMode.html#SHOW_ALL>
>>> >All the 3 options above zoom the application upto 400%! (components
>>>are
>>> >scaled up way too big)
>>> >
>>> >Then I tried NO_SCALE
>>> ><
>>> 
>>>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash
>>>/
>>> >display/StageScaleMode.html#NO_SCALE>.
>>> >This doesn't change anything. It stays as is(components size look
>>>quite
>>> >small).
>>> >
>>> >I came across this link:
>>> >
>>> 
>>>http://stackoverflow.com/questions/23242855/using-stage-scalemode-stages
>>>ca
>>> >lemode-show-all-how-to-determine-current-zoom-per
>>> >
>>> >Someone has mentioned this there:
>>> >"Finally, I accomplished the same by alternative way. I instead of
>>>using,
>>> >stage.scaleMode = StageScaleMode.SHOW_ALL, used stage.scaleMode =
>>> >StageScaleMode.NO_SCALE and manually scaled the root to achieve zoom.
>>> >Doing
>>> >this, I now have zoomlevel known :). Hope this helps anyone with
>>>similar
>>> >problem."
>>> >
>>> >I'm not sure what 'manually scaled the root' meant there. Any idea?
>>> >
>>> >On Mon, Feb 16, 2015 at 11:50 AM, Alex Harui <ah...@adobe.com> wrote:
>>> >
>>> >> Have you tried using Stage.scaleMode?
>>> >>
>>> >> On 2/15/15, 9:01 PM, "Deepak MS" <me...@gmail.com> wrote:
>>> >>
>>> >> >Hi Om,
>>> >> >Yes, Capabilities.screenDPI is there, but how do I set the DPI
>>>value
>>> >>for
>>> >> >the application?
>>> >> >
>>> >> >I tried a trace:
>>> >> >trace(Capabilities.screenDPI.toString());
>>> >> >                trace(Capabilities.screenResolutionX.toString());
>>> >> >                trace(Capabilities.screenResolutionY.toString());
>>> >> >
>>> >> >In old laptop this is what I got:
>>> >> >72
>>> >> >1600
>>> >> >900
>>> >> >
>>> >> >In new laptop:
>>> >> >72
>>> >> >1920
>>> >> >1080
>>> >> >
>>> >> >Based on screenResolutionX\Y, I need to override the DPI value of
>>>the
>>> >> >application. Where can I do that part?
>>> >> >
>>> >> >On Mon, Feb 16, 2015 at 10:04 AM, OmPrakash Muppirala
>>> >> ><bi...@gmail.com>
>>> >> >wrote:
>>> >> >
>>> >> >> Have you tried Capabilities.screenDPI ?  It should be available
>>>in
>>> mx
>>> >> >> applications as well.
>>> >> >>
>>> >> >> Thanks,
>>> >> >> Om
>>> >> >>
>>> >> >> On Sun, Feb 15, 2015 at 8:29 PM, Deepak MS <
>>> megharajdeepak@gmail.com>
>>> >> >> wrote:
>>> >> >>
>>> >> >> > Hello,
>>> >> >> > Just like retina display ipads, off late, there have been
>>>laptops
>>> >>with
>>> >> >> > higher DPIs. And we have some of our flex 3 applications in
>>>which
>>> >>all
>>> >> >>the
>>> >> >> > components look too small in overall size on screen in new
>>>laptops
>>> >> >> > (something like the screenshots shown here in this link:
>>> >> >> > https://forums.adobe.com/thread/977263 )
>>> >> >> >
>>> >> >> > We can achieve it in flex 4 :
>>> >> >> >
>>> >> >> >
>>> >> >>
>>> >> >>
>>> >>
>>> >>
>>> 
>>>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/co
>>>r
>>> >> >>e/RuntimeDPIProvider.html
>>> >> >> >
>>> >> >> > But I want to know if there is anything I can try to achieve
>>>it in
>>> >> >>flex 3
>>> >> >> > we applications, as it doesn't have "runtimeDPIProvider"
>>>property.
>>> >> >> >
>>> >> >> > Appreciate your help.
>>> >> >> >
>>> >> >> > Cheers!
>>> >> >> >
>>> >> >>
>>> >>
>>> >>
>>>
>>>
>>


Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Instead of stage.scaleX i used just scaleX (core application's scaleX) and
it worked well.

Based on Capabilities.screenResolutionX\Y values, I'll customly scale the
application's scaleX\Y.

Thanks Om and Alex.

On Mon, Feb 16, 2015 at 2:17 PM, Deepak MS <me...@gmail.com> wrote:

> Ok. I thought scaleX\Y would work.
>
> But when I try to set the scaleX\Y value, I'm getting error:
> //systemManager.stage.scaleMode = StageScaleMode.NO_SCALE;
>                 systemManager.stage.scaleX = 1.25;
>                 systemManager.stage.scaleY = 1.25;
>
> Error: Error #2071: The Stage class does not implement this property or
> method.
>     at Error$/throwError()
>     at flash.display::Stage/set scaleX()
>     at
> App/onCreationComplete()[C:\Users\deepakms\Documents\FlexProjectsWorkspaces\NewProjectSpace\IMD\src\App.mxml:76]
>     at
> App/___App_Application1_creationComplete()[C:\Users\deepakms\Documents\FlexProjectsWorkspaces\NewProjectSpace\IMD\src\App.mxml:13]
>     at flash.events::EventDispatcher/dispatchEventFunction()
>     at flash.events::EventDispatcher/dispatchEvent()
>     at
> mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:9590]
>     at mx.core::UIComponent/set
> initialized()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:1175]
>     at
> mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718]
>     at Function/http://adobe.com/AS3/2006/builtin::apply()
>     at
> mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8892]
>     at
> mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8832]
>
>
> What does runtimeDPIProvider in flex 4 internally do? I couldn't get much
> details on it, as you said, I believe it's about scaling ultimately. May be
> I can try to replicate that in flex 3 application?
>
>
>
> On Mon, Feb 16, 2015 at 1:05 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> Flex defaults to NO_SCALE.
>>
>> In Flex, the SystemManager is the root.  You can play with setting
>> systemManager.scaleX and systemManager.scaleY.
>>
>> IIRC, there are several factors to controlling stage scale:  the SWF
>> dimensions stored in the SWF header and set in the MXML application tag
>> and the actual size of the window.  In AIR, you can control the size of
>> the window from code  AIR also has the requestedDisplayResolution
>> descriptor tag.
>>
>> If the SWF size matches the Window size it should scale more predictably.
>> I haven’t tried it with AIR and Retina.
>>
>> https://blogs.adobe.com/aharui/2008/01/flex_and_scalemodes.html
>>
>> On 2/15/15, 11:03 PM, "Deepak MS" <me...@gmail.com> wrote:
>>
>> >Hi Alex,
>> >Just looked at it.
>> >
>> >There are 4 different values it can take. I tried all 4:
>> >EXACT_FIT
>> ><
>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/
>> >display/StageScaleMode.html#EXACT_FIT>
>> >NO_BORDER
>> ><
>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/
>> >display/StageScaleMode.html#NO_BORDER>
>> >SHOW_ALL
>> ><
>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/
>> >display/StageScaleMode.html#SHOW_ALL>
>> >All the 3 options above zoom the application upto 400%! (components are
>> >scaled up way too big)
>> >
>> >Then I tried NO_SCALE
>> ><
>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/
>> >display/StageScaleMode.html#NO_SCALE>.
>> >This doesn't change anything. It stays as is(components size look quite
>> >small).
>> >
>> >I came across this link:
>> >
>> http://stackoverflow.com/questions/23242855/using-stage-scalemode-stagesca
>> >lemode-show-all-how-to-determine-current-zoom-per
>> >
>> >Someone has mentioned this there:
>> >"Finally, I accomplished the same by alternative way. I instead of using,
>> >stage.scaleMode = StageScaleMode.SHOW_ALL, used stage.scaleMode =
>> >StageScaleMode.NO_SCALE and manually scaled the root to achieve zoom.
>> >Doing
>> >this, I now have zoomlevel known :). Hope this helps anyone with similar
>> >problem."
>> >
>> >I'm not sure what 'manually scaled the root' meant there. Any idea?
>> >
>> >On Mon, Feb 16, 2015 at 11:50 AM, Alex Harui <ah...@adobe.com> wrote:
>> >
>> >> Have you tried using Stage.scaleMode?
>> >>
>> >> On 2/15/15, 9:01 PM, "Deepak MS" <me...@gmail.com> wrote:
>> >>
>> >> >Hi Om,
>> >> >Yes, Capabilities.screenDPI is there, but how do I set the DPI value
>> >>for
>> >> >the application?
>> >> >
>> >> >I tried a trace:
>> >> >trace(Capabilities.screenDPI.toString());
>> >> >                trace(Capabilities.screenResolutionX.toString());
>> >> >                trace(Capabilities.screenResolutionY.toString());
>> >> >
>> >> >In old laptop this is what I got:
>> >> >72
>> >> >1600
>> >> >900
>> >> >
>> >> >In new laptop:
>> >> >72
>> >> >1920
>> >> >1080
>> >> >
>> >> >Based on screenResolutionX\Y, I need to override the DPI value of the
>> >> >application. Where can I do that part?
>> >> >
>> >> >On Mon, Feb 16, 2015 at 10:04 AM, OmPrakash Muppirala
>> >> ><bi...@gmail.com>
>> >> >wrote:
>> >> >
>> >> >> Have you tried Capabilities.screenDPI ?  It should be available in
>> mx
>> >> >> applications as well.
>> >> >>
>> >> >> Thanks,
>> >> >> Om
>> >> >>
>> >> >> On Sun, Feb 15, 2015 at 8:29 PM, Deepak MS <
>> megharajdeepak@gmail.com>
>> >> >> wrote:
>> >> >>
>> >> >> > Hello,
>> >> >> > Just like retina display ipads, off late, there have been laptops
>> >>with
>> >> >> > higher DPIs. And we have some of our flex 3 applications in which
>> >>all
>> >> >>the
>> >> >> > components look too small in overall size on screen in new laptops
>> >> >> > (something like the screenshots shown here in this link:
>> >> >> > https://forums.adobe.com/thread/977263 )
>> >> >> >
>> >> >> > We can achieve it in flex 4 :
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >>
>> >>
>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/cor
>> >> >>e/RuntimeDPIProvider.html
>> >> >> >
>> >> >> > But I want to know if there is anything I can try to achieve it in
>> >> >>flex 3
>> >> >> > we applications, as it doesn't have "runtimeDPIProvider" property.
>> >> >> >
>> >> >> > Appreciate your help.
>> >> >> >
>> >> >> > Cheers!
>> >> >> >
>> >> >>
>> >>
>> >>
>>
>>
>

Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Ok. I thought scaleX\Y would work.

But when I try to set the scaleX\Y value, I'm getting error:
//systemManager.stage.scaleMode = StageScaleMode.NO_SCALE;
                systemManager.stage.scaleX = 1.25;
                systemManager.stage.scaleY = 1.25;

Error: Error #2071: The Stage class does not implement this property or
method.
    at Error$/throwError()
    at flash.display::Stage/set scaleX()
    at
App/onCreationComplete()[C:\Users\deepakms\Documents\FlexProjectsWorkspaces\NewProjectSpace\IMD\src\App.mxml:76]
    at
App/___App_Application1_creationComplete()[C:\Users\deepakms\Documents\FlexProjectsWorkspaces\NewProjectSpace\IMD\src\App.mxml:13]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at
mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:9590]
    at mx.core::UIComponent/set
initialized()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:1175]
    at
mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at
mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8892]
    at
mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8832]


What does runtimeDPIProvider in flex 4 internally do? I couldn't get much
details on it, as you said, I believe it's about scaling ultimately. May be
I can try to replicate that in flex 3 application?



On Mon, Feb 16, 2015 at 1:05 PM, Alex Harui <ah...@adobe.com> wrote:

> Flex defaults to NO_SCALE.
>
> In Flex, the SystemManager is the root.  You can play with setting
> systemManager.scaleX and systemManager.scaleY.
>
> IIRC, there are several factors to controlling stage scale:  the SWF
> dimensions stored in the SWF header and set in the MXML application tag
> and the actual size of the window.  In AIR, you can control the size of
> the window from code  AIR also has the requestedDisplayResolution
> descriptor tag.
>
> If the SWF size matches the Window size it should scale more predictably.
> I haven’t tried it with AIR and Retina.
>
> https://blogs.adobe.com/aharui/2008/01/flex_and_scalemodes.html
>
> On 2/15/15, 11:03 PM, "Deepak MS" <me...@gmail.com> wrote:
>
> >Hi Alex,
> >Just looked at it.
> >
> >There are 4 different values it can take. I tried all 4:
> >EXACT_FIT
> ><
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/
> >display/StageScaleMode.html#EXACT_FIT>
> >NO_BORDER
> ><
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/
> >display/StageScaleMode.html#NO_BORDER>
> >SHOW_ALL
> ><
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/
> >display/StageScaleMode.html#SHOW_ALL>
> >All the 3 options above zoom the application upto 400%! (components are
> >scaled up way too big)
> >
> >Then I tried NO_SCALE
> ><
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/
> >display/StageScaleMode.html#NO_SCALE>.
> >This doesn't change anything. It stays as is(components size look quite
> >small).
> >
> >I came across this link:
> >
> http://stackoverflow.com/questions/23242855/using-stage-scalemode-stagesca
> >lemode-show-all-how-to-determine-current-zoom-per
> >
> >Someone has mentioned this there:
> >"Finally, I accomplished the same by alternative way. I instead of using,
> >stage.scaleMode = StageScaleMode.SHOW_ALL, used stage.scaleMode =
> >StageScaleMode.NO_SCALE and manually scaled the root to achieve zoom.
> >Doing
> >this, I now have zoomlevel known :). Hope this helps anyone with similar
> >problem."
> >
> >I'm not sure what 'manually scaled the root' meant there. Any idea?
> >
> >On Mon, Feb 16, 2015 at 11:50 AM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> Have you tried using Stage.scaleMode?
> >>
> >> On 2/15/15, 9:01 PM, "Deepak MS" <me...@gmail.com> wrote:
> >>
> >> >Hi Om,
> >> >Yes, Capabilities.screenDPI is there, but how do I set the DPI value
> >>for
> >> >the application?
> >> >
> >> >I tried a trace:
> >> >trace(Capabilities.screenDPI.toString());
> >> >                trace(Capabilities.screenResolutionX.toString());
> >> >                trace(Capabilities.screenResolutionY.toString());
> >> >
> >> >In old laptop this is what I got:
> >> >72
> >> >1600
> >> >900
> >> >
> >> >In new laptop:
> >> >72
> >> >1920
> >> >1080
> >> >
> >> >Based on screenResolutionX\Y, I need to override the DPI value of the
> >> >application. Where can I do that part?
> >> >
> >> >On Mon, Feb 16, 2015 at 10:04 AM, OmPrakash Muppirala
> >> ><bi...@gmail.com>
> >> >wrote:
> >> >
> >> >> Have you tried Capabilities.screenDPI ?  It should be available in mx
> >> >> applications as well.
> >> >>
> >> >> Thanks,
> >> >> Om
> >> >>
> >> >> On Sun, Feb 15, 2015 at 8:29 PM, Deepak MS <megharajdeepak@gmail.com
> >
> >> >> wrote:
> >> >>
> >> >> > Hello,
> >> >> > Just like retina display ipads, off late, there have been laptops
> >>with
> >> >> > higher DPIs. And we have some of our flex 3 applications in which
> >>all
> >> >>the
> >> >> > components look too small in overall size on screen in new laptops
> >> >> > (something like the screenshots shown here in this link:
> >> >> > https://forums.adobe.com/thread/977263 )
> >> >> >
> >> >> > We can achieve it in flex 4 :
> >> >> >
> >> >> >
> >> >>
> >> >>
> >>
> >>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/cor
> >> >>e/RuntimeDPIProvider.html
> >> >> >
> >> >> > But I want to know if there is anything I can try to achieve it in
> >> >>flex 3
> >> >> > we applications, as it doesn't have "runtimeDPIProvider" property.
> >> >> >
> >> >> > Appreciate your help.
> >> >> >
> >> >> > Cheers!
> >> >> >
> >> >>
> >>
> >>
>
>

Re: runtimeDPIProvider in mx:Application?

Posted by Alex Harui <ah...@adobe.com>.
Flex defaults to NO_SCALE.

In Flex, the SystemManager is the root.  You can play with setting
systemManager.scaleX and systemManager.scaleY.

IIRC, there are several factors to controlling stage scale:  the SWF
dimensions stored in the SWF header and set in the MXML application tag
and the actual size of the window.  In AIR, you can control the size of
the window from code  AIR also has the requestedDisplayResolution
descriptor tag.  

If the SWF size matches the Window size it should scale more predictably.
I haven’t tried it with AIR and Retina.

https://blogs.adobe.com/aharui/2008/01/flex_and_scalemodes.html

On 2/15/15, 11:03 PM, "Deepak MS" <me...@gmail.com> wrote:

>Hi Alex,
>Just looked at it.
>
>There are 4 different values it can take. I tried all 4:
>EXACT_FIT
><http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/
>display/StageScaleMode.html#EXACT_FIT>
>NO_BORDER
><http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/
>display/StageScaleMode.html#NO_BORDER>
>SHOW_ALL
><http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/
>display/StageScaleMode.html#SHOW_ALL>
>All the 3 options above zoom the application upto 400%! (components are
>scaled up way too big)
>
>Then I tried NO_SCALE
><http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/
>display/StageScaleMode.html#NO_SCALE>.
>This doesn't change anything. It stays as is(components size look quite
>small).
>
>I came across this link:
>http://stackoverflow.com/questions/23242855/using-stage-scalemode-stagesca
>lemode-show-all-how-to-determine-current-zoom-per
>
>Someone has mentioned this there:
>"Finally, I accomplished the same by alternative way. I instead of using,
>stage.scaleMode = StageScaleMode.SHOW_ALL, used stage.scaleMode =
>StageScaleMode.NO_SCALE and manually scaled the root to achieve zoom.
>Doing
>this, I now have zoomlevel known :). Hope this helps anyone with similar
>problem."
>
>I'm not sure what 'manually scaled the root' meant there. Any idea?
>
>On Mon, Feb 16, 2015 at 11:50 AM, Alex Harui <ah...@adobe.com> wrote:
>
>> Have you tried using Stage.scaleMode?
>>
>> On 2/15/15, 9:01 PM, "Deepak MS" <me...@gmail.com> wrote:
>>
>> >Hi Om,
>> >Yes, Capabilities.screenDPI is there, but how do I set the DPI value
>>for
>> >the application?
>> >
>> >I tried a trace:
>> >trace(Capabilities.screenDPI.toString());
>> >                trace(Capabilities.screenResolutionX.toString());
>> >                trace(Capabilities.screenResolutionY.toString());
>> >
>> >In old laptop this is what I got:
>> >72
>> >1600
>> >900
>> >
>> >In new laptop:
>> >72
>> >1920
>> >1080
>> >
>> >Based on screenResolutionX\Y, I need to override the DPI value of the
>> >application. Where can I do that part?
>> >
>> >On Mon, Feb 16, 2015 at 10:04 AM, OmPrakash Muppirala
>> ><bi...@gmail.com>
>> >wrote:
>> >
>> >> Have you tried Capabilities.screenDPI ?  It should be available in mx
>> >> applications as well.
>> >>
>> >> Thanks,
>> >> Om
>> >>
>> >> On Sun, Feb 15, 2015 at 8:29 PM, Deepak MS <me...@gmail.com>
>> >> wrote:
>> >>
>> >> > Hello,
>> >> > Just like retina display ipads, off late, there have been laptops
>>with
>> >> > higher DPIs. And we have some of our flex 3 applications in which
>>all
>> >>the
>> >> > components look too small in overall size on screen in new laptops
>> >> > (something like the screenshots shown here in this link:
>> >> > https://forums.adobe.com/thread/977263 )
>> >> >
>> >> > We can achieve it in flex 4 :
>> >> >
>> >> >
>> >>
>> >>
>> 
>>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/cor
>> >>e/RuntimeDPIProvider.html
>> >> >
>> >> > But I want to know if there is anything I can try to achieve it in
>> >>flex 3
>> >> > we applications, as it doesn't have "runtimeDPIProvider" property.
>> >> >
>> >> > Appreciate your help.
>> >> >
>> >> > Cheers!
>> >> >
>> >>
>>
>>


Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Hi Alex,
Just looked at it.

There are 4 different values it can take. I tried all 4:
EXACT_FIT
<http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageScaleMode.html#EXACT_FIT>
NO_BORDER
<http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageScaleMode.html#NO_BORDER>
SHOW_ALL
<http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageScaleMode.html#SHOW_ALL>
All the 3 options above zoom the application upto 400%! (components are
scaled up way too big)

Then I tried NO_SCALE
<http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageScaleMode.html#NO_SCALE>.
This doesn't change anything. It stays as is(components size look quite
small).

I came across this link:
http://stackoverflow.com/questions/23242855/using-stage-scalemode-stagescalemode-show-all-how-to-determine-current-zoom-per

Someone has mentioned this there:
"Finally, I accomplished the same by alternative way. I instead of using,
stage.scaleMode = StageScaleMode.SHOW_ALL, used stage.scaleMode =
StageScaleMode.NO_SCALE and manually scaled the root to achieve zoom. Doing
this, I now have zoomlevel known :). Hope this helps anyone with similar
problem."

I'm not sure what 'manually scaled the root' meant there. Any idea?

On Mon, Feb 16, 2015 at 11:50 AM, Alex Harui <ah...@adobe.com> wrote:

> Have you tried using Stage.scaleMode?
>
> On 2/15/15, 9:01 PM, "Deepak MS" <me...@gmail.com> wrote:
>
> >Hi Om,
> >Yes, Capabilities.screenDPI is there, but how do I set the DPI value for
> >the application?
> >
> >I tried a trace:
> >trace(Capabilities.screenDPI.toString());
> >                trace(Capabilities.screenResolutionX.toString());
> >                trace(Capabilities.screenResolutionY.toString());
> >
> >In old laptop this is what I got:
> >72
> >1600
> >900
> >
> >In new laptop:
> >72
> >1920
> >1080
> >
> >Based on screenResolutionX\Y, I need to override the DPI value of the
> >application. Where can I do that part?
> >
> >On Mon, Feb 16, 2015 at 10:04 AM, OmPrakash Muppirala
> ><bi...@gmail.com>
> >wrote:
> >
> >> Have you tried Capabilities.screenDPI ?  It should be available in mx
> >> applications as well.
> >>
> >> Thanks,
> >> Om
> >>
> >> On Sun, Feb 15, 2015 at 8:29 PM, Deepak MS <me...@gmail.com>
> >> wrote:
> >>
> >> > Hello,
> >> > Just like retina display ipads, off late, there have been laptops with
> >> > higher DPIs. And we have some of our flex 3 applications in which all
> >>the
> >> > components look too small in overall size on screen in new laptops
> >> > (something like the screenshots shown here in this link:
> >> > https://forums.adobe.com/thread/977263 )
> >> >
> >> > We can achieve it in flex 4 :
> >> >
> >> >
> >>
> >>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/cor
> >>e/RuntimeDPIProvider.html
> >> >
> >> > But I want to know if there is anything I can try to achieve it in
> >>flex 3
> >> > we applications, as it doesn't have "runtimeDPIProvider" property.
> >> >
> >> > Appreciate your help.
> >> >
> >> > Cheers!
> >> >
> >>
>
>

Re: runtimeDPIProvider in mx:Application?

Posted by Alex Harui <ah...@adobe.com>.
Have you tried using Stage.scaleMode?

On 2/15/15, 9:01 PM, "Deepak MS" <me...@gmail.com> wrote:

>Hi Om,
>Yes, Capabilities.screenDPI is there, but how do I set the DPI value for
>the application?
>
>I tried a trace:
>trace(Capabilities.screenDPI.toString());
>                trace(Capabilities.screenResolutionX.toString());
>                trace(Capabilities.screenResolutionY.toString());
>
>In old laptop this is what I got:
>72
>1600
>900
>
>In new laptop:
>72
>1920
>1080
>
>Based on screenResolutionX\Y, I need to override the DPI value of the
>application. Where can I do that part?
>
>On Mon, Feb 16, 2015 at 10:04 AM, OmPrakash Muppirala
><bi...@gmail.com>
>wrote:
>
>> Have you tried Capabilities.screenDPI ?  It should be available in mx
>> applications as well.
>>
>> Thanks,
>> Om
>>
>> On Sun, Feb 15, 2015 at 8:29 PM, Deepak MS <me...@gmail.com>
>> wrote:
>>
>> > Hello,
>> > Just like retina display ipads, off late, there have been laptops with
>> > higher DPIs. And we have some of our flex 3 applications in which all
>>the
>> > components look too small in overall size on screen in new laptops
>> > (something like the screenshots shown here in this link:
>> > https://forums.adobe.com/thread/977263 )
>> >
>> > We can achieve it in flex 4 :
>> >
>> >
>> 
>>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/cor
>>e/RuntimeDPIProvider.html
>> >
>> > But I want to know if there is anything I can try to achieve it in
>>flex 3
>> > we applications, as it doesn't have "runtimeDPIProvider" property.
>> >
>> > Appreciate your help.
>> >
>> > Cheers!
>> >
>>


Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Hi Om,
Yes, Capabilities.screenDPI is there, but how do I set the DPI value for
the application?

I tried a trace:
trace(Capabilities.screenDPI.toString());
                trace(Capabilities.screenResolutionX.toString());
                trace(Capabilities.screenResolutionY.toString());

In old laptop this is what I got:
72
1600
900

In new laptop:
72
1920
1080

Based on screenResolutionX\Y, I need to override the DPI value of the
application. Where can I do that part?

On Mon, Feb 16, 2015 at 10:04 AM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

> Have you tried Capabilities.screenDPI ?  It should be available in mx
> applications as well.
>
> Thanks,
> Om
>
> On Sun, Feb 15, 2015 at 8:29 PM, Deepak MS <me...@gmail.com>
> wrote:
>
> > Hello,
> > Just like retina display ipads, off late, there have been laptops with
> > higher DPIs. And we have some of our flex 3 applications in which all the
> > components look too small in overall size on screen in new laptops
> > (something like the screenshots shown here in this link:
> > https://forums.adobe.com/thread/977263 )
> >
> > We can achieve it in flex 4 :
> >
> >
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/RuntimeDPIProvider.html
> >
> > But I want to know if there is anything I can try to achieve it in flex 3
> > we applications, as it doesn't have "runtimeDPIProvider" property.
> >
> > Appreciate your help.
> >
> > Cheers!
> >
>

Re: runtimeDPIProvider in mx:Application?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Have you tried Capabilities.screenDPI ?  It should be available in mx
applications as well.

Thanks,
Om

On Sun, Feb 15, 2015 at 8:29 PM, Deepak MS <me...@gmail.com> wrote:

> Hello,
> Just like retina display ipads, off late, there have been laptops with
> higher DPIs. And we have some of our flex 3 applications in which all the
> components look too small in overall size on screen in new laptops
> (something like the screenshots shown here in this link:
> https://forums.adobe.com/thread/977263 )
>
> We can achieve it in flex 4 :
>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/RuntimeDPIProvider.html
>
> But I want to know if there is anything I can try to achieve it in flex 3
> we applications, as it doesn't have "runtimeDPIProvider" property.
>
> Appreciate your help.
>
> Cheers!
>

Scaling an app

Posted by Lane Friesen <la...@hotmail.com>.
Some thoughts,

I do all scaling manually. First, I write all (non-animated) programming for 
600 pixel width and 1024 pixel height, hard-coded. Then I define a variable 
screenRatio:

if(mx.core.FlexGlobals.topLevelApplication.aspectRatio == "portrait")
{
    screenRatio = (this.width)/600;
}
else
{
    screenRatio = (this.width)/1010;
}

Most (non-animated) components are then scaled in the init() function, as in 
component.scaleX = screenRatio, and component.scaleY=screenRatio. This 
automatically takes care of some fontScaling as well.

I set up an event handler in the init() section:

this.addEventListener(ResizeEvent.RESIZE,shiftTheFrame,false,0,true);

The function shiftTheFrame contains

if(mx.core.FlexGlobals.topLevelApplication.aspectRatio == "portrait")
{
    here I adjust component width and height for portrait view
}
else
{
    here I adjust component width and height for landscape view
}

This allows the device to be rotated. paddingTop for a TextArea and other 
parameters may need to be scaled as well and can be altered in a rotation. 
It can be easier to scale something like a button by scaling the label; this 
is done with code such as:

helpButton.setStyle("fontSize",new String(26*screenRatio));

Placement of scaled sections is best left to MXML, meaning that the 
components are defined using MXML and not dynamically by ActionScript.

Animations work faster in components that are not scaled. I thus place 
animations in segments defined by
component.height = this.height
component.width = this.width
or width=100% if defined in MXML.

These various corrections are placed not only in init() but inside 
shiftTheFrame as well, so that the component sizes are properly adjusted as 
the device is rotated. Sometimes it is easier to develop separate 
presentations for portrait and landscape view and then to adjust visibility 
in shiftTheFrame (component.visible=false or component.visible=true as 
required). Alternatively, components can be removed or added to other 
components as necessary (as long as they don't contains html; the coding 
will not fully survive a move).

Scaled and unscaled (animated) components are placed into the same page; 
that can be a bit tricky because MXML can no longer do this for you. For 
instance, one might define one component's position absolutely in relation 
to the x- or y-coordinate of some named aspect of another (the tricky part 
is that this does not always reflect the scaling). Also, you have to be a 
bit cautious with height; give it a bit of leeway because of differing 
aspect ratios.

A page with text that needs to be read must have options to alter the font 
size - some people like the text larger and others appreciate it smaller. I 
do that by placed html in the text such as <font size='25'>. I then do a 
global search and replace for this text and replace the number with 
something else (eg 32), depending on how the size has been altered. I store 
the value in the persistence manager so that it is used and a replacement 
automatically made the next time the app is launched. This allows me to 
leave a TextArea unscaled; the adjustment for fontSize for various device 
screen densities is folded into the initial one-time sizing of the text as a 
preference.

I might add that I handle all persistence issues manually view by view and 
use persistence only in views or components that require it. Everything in 
one view is cleaned up manually before transiting to the next view. This 
creates a snappy and highly stable app even with something that finally 
becomes rather complex and even in some really old hardware.

I've generated an app (600 English lessons with integrated animated 
exercises backed by multiple hours of either on-device or on-demand audio 
presenting text with over 3500 new vocabulary words) using these techniques 
that scales seamlessly and automatically (same identical apk file) from 480 
X 300 all the way up to 2560 X 1600. It's just as fast with scaling as it 
would be if there were no scaling (since any sections that require 
animations remain unscaled; TextArea segments remain unscaled and thus 
continue to scroll smoothly and easily).

Lane.


--------------------------------------------------
From: "Deepak MS" <me...@gmail.com>
Sent: Monday, February 16, 2015 1:29 PM
To: <us...@flex.apache.org>
Subject: runtimeDPIProvider in mx:Application?

> Hello,
> Just like retina display ipads, off late, there have been laptops with
> higher DPIs. And we have some of our flex 3 applications in which all the
> components look too small in overall size on screen in new laptops
> (something like the screenshots shown here in this link:
> https://forums.adobe.com/thread/977263 )
>
> We can achieve it in flex 4 :
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/RuntimeDPIProvider.html
>
> But I want to know if there is anything I can try to achieve it in flex 3
> we applications, as it doesn't have "runtimeDPIProvider" property.
>
> Appreciate your help.
>
> Cheers!
>