You Are Here:

Community: Wiki

This page was last modified on 2 June 2008, at 06:45.

How to make Flash Lite aware of softkey location and screen orientation

From Forum Nokia Wiki


Flash Lite 1.1

Contents

How to make Flash Lite aware of softkey location and screen orientation

Nokia devices support multiple screen orientation. Some devices provide dedicated softkey for each screen orientation.(like N93, N95)

Nokia 93 Screen Orientation

Mobile devices where the screen orientation and softkey location can be easily changed.


Create flashlite 1.1 game or application, where the screen orientation and softkey location can be changed.

  • How to get the current location of the softkeys relocate to the X and y axis of the screen.

Obtaining the current softkey location

The fscommand2("GetSoftKeyLocation") command to obtain the current softkey location. Add key listener

// The screen orientation has changed by give an Insert key event.
On(KeyPress"<Insert>")
{
//Define a variable
lc=fscommand2("GetSoftKeyLocation")
}

The lc contains a value that represents the location of the softkey as follows:

  • 0 The softkeys are located on the top of the device screen.
  • 1 The softkeys are located on the left of the device screen.
  • 2 The softkeys are located on the bottom of the device screen.
  • 3 The softkeys are located on the right of the device screen.
  • Here, Represent the softkey are located on the bottom of the device screen and softkeys are located on the right of the device screen.
  • 2 represent the bottom and 3 represent the right softkey location.
  • Create a movie clip back text and give it a name txt_function.
  • Fist frame is bottom location text and give it a frame name bottom.
  • Second frame is right location set text according to the softkey and give it a frame name right

Add this code

// The screen orientation has changed by give an Insert key event.
On(keyPress"<Insert>")
{
//Define a variable
lc=fscommand2("GetSoftKeyLocation")
}
//when the device screen orientation changed the softkey location also changed.
if(lc==2){
tellTarget("txt_function"){
call("bottom")
}
} else if (lc==3){
tellTarget("txt_function"){
call("right")
}
}

Command support on real device, not support in test device emulator. (like N93, N95)

Download

you can download an example with source code here:

softkey_location

Author

--Narender Raul

Related Wiki Articles

No related wiki articles found

Rate This

 
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 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fFlashE5fE4citeE5fAPIE5fBridgeE5fInterfaceX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZflashQ qfnZtopicQUqfnTopicZflashE5fliteQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ