Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Revision as of 04:41, 14 May 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

We do not recommend Flash Lite development on current Nokia devices, and all Flash Lite articles on this wiki have been archived. Flash Lite has been removed from all Nokia Asha and recent Series 40 devices and has limited support on Symbian. Specific information for Nokia Belle is available in Flash Lite on Nokia Browser for Symbian. Specific information for OLD Series 40 and Symbian devices is available in the Flash Lite Developers Library.

Article Metadata
Code ExampleArticle
Created: sellis (20 Feb 2007)
Last edited: hamishwillee (14 May 2013)

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

This page was last modified on 14 May 2013, at 04:41.
162 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.

×