You Are Here:

Community: Wiki

 

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

From Forum Nokia Wiki

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 "http://wiki.forum.nokia.com/index.php/Flash_lite_:_Auto_resize_flash_lite_application"

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia