×
Namespaces

Variants
Actions

Archived Talk:How to make a Flash Lite application running in any screen orientation

From Nokia Developer Wiki
Jump to: navigation, search

I think it's better to use the width/height ratio instead of the exact pixel size. If not for any other reason, then to avoid rewriting the code for every resolution there might be ;o)

if (Stage.width / Stage.height < 1)

Cheers -Ruikku

Contents

it does not work on my N95

I tried this code on my N95 but it doesn't work properly: it doesn't switch from a resolution to another if I change the resolution using the sliding keyboard. I also tried the example files :( Could anyone help me, please? thanks Antonio

Unfortunately no

The thing is, the screen capabilities are always set to portrait. I'm working on a workaround myself...

a dirty solution

I solved this issue using a dirty solution: I put the function inside a setInterval function (with 100 as interval value). Basically it continuously checks the orientation value and then switch from a movieclip to another one.

I hope it can help...

does not

Since as I mentioned earlier you always get the same orientation (tried it myself as well ;o)

My idea for the same will be like

Take a variable which maintain current status of application

I mean to say,

Initially application will start with noScale mode.

Stage.scaleMode = "noScale";

So that you can get proper height and width of screen due to fullScreen mode.

then after change Stage mode to normal mode means



Stage.scaleMode = "exactFit";

Using this you can code your elements and height as well width ratio.


For initial loading this thing will enough, I think :).

Then after,

You have to place a timer where mentioned function will return Stage height and width,

Using same, changing mode.

We can’t handle stage resize event because that event will work only in noScale stage scale mode.

Ravindra Suthar

Retrieved from Flash Lite : Auto resize Flash Lite application

This page was last modified on 13 May 2013, at 11:28.
23 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×