Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 08:47, 2 April 2007.

Flash Lite 2.0 Soft Keys Example

From Forum Nokia Wiki


Soft Keys on a mobile refer to the 2 keys which are usually found immediately below the mobile screen. They are called "soft" because their use is decided by the software that you run on your device.

The use of the Soft Keys in Flash Lite is no different from the soft keys in any other application. When you run a Flash Lite application in the Flash Lite Player, the player displays its own pull up menu with options like Volume, Pause, Rewind, Quality, Full Screen, Zoom In, Send etc on pressing the Left Soft Key. Pressing the Right Soft Key will exit the application.

Soft Keys can be controlled from within a Flash Lite application. You can prevent its default behaviour by remapping it to perform the functions you want it to, and this can be done with the code that is mentioned below.

fscommand2("SetSoftKeys", "left", "right");

You begin by remapping the Soft Keys by using the SetSoftKeys fscommand2 command. It is essential that you place this code on the main timeline, at a frame from where you want to start managing the soft keys on your own.

var keyList:Object = new Object();
keyList.onKeyDown = function(){
	var keyCode = Key.getCode();
	if(keyCode == ExtendedKey.SOFT1){
		trace("Left Soft Key Pressed");
	}else if(keyCode == ExtendedKey.SOFT2){
		trace("Right Soft Key Pressed");
	}
}
Key.addListener(keyList);

Flash Lite now has an ExtendedKey Class, which allows the use of upto 12 Soft Keys as supported by the device. We use the ExtendedKey Class along with the Key Class to access the Soft Keys.

fscommand2("ResetSoftKeys");

Finally while exiting the application, its always advisable to release the remapped soft keys by using the ResetSoftKeys fscommand2 command.

LINKS :
Learn more about Soft Keys through the Adobe Live Docs link
Keys supported in Flash Lite link

Related Discussions
Thread Thread Starter Forum Replies Last Post
customized soft keys palak_shah_23 General Symbian C++ 3 2006-06-22 12:07
Is possible to insert Flash Lite content inside Symbian Container Hromada Flash Lite on Nokia Devices 1 2007-11-27 10:42
Update Flash Lite to 2.1 - 6120 classic ctmstudios General Discussion 2 2008-03-18 06:29
loadMovie xiaolvren Flash Lite on Nokia Devices 6 2008-05-12 15:28
Embebed Flash Lite objects fjorge_ht General Browsing 5 2007-09-04 21:05
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZflashE5fliteQ
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX