A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: SetSoftKeys is not working at all!!!

  1. #1
    Junior Member
    Join Date
    Apr 2009

    Angry SetSoftKeys is not working at all!!!

    I just created a new Flash for mobile file using the default settings (player 1.1 and actionscript 1.0) and I added the following code in the first frame:

    fscommand2("SetSoftKeys", "Options", "Exit");
    Nothing happened at all!! I tried to add a trace statement after it but it was not printed

    Could u plz send me a .fla of a working program that is able to set the softkeys??

  2. #2
    Senior Member
    Join Date
    Aug 2006
    To use the soft keys in an application:
    Create a new document from the Flash Lite 1.1 Series 60 device template.
    For more information about device templates, see Using Flash Lite document templates.

    Open the Device Settings dialog box, and select the Standalone Player content type. Add one of the devices in the T-Mobile > Nokia folder to your list of test devices.
    In the Timeline, select the Content layer.
    Using the Text tool, create a static text field named Left (or text of your choice) and position it in the lower-left corner of the Stage, above the Left soft key on the device.
    Create another static text field named Right, and position it in the lower-right corner of the Stage, above the Right soft key on the device.
    Using the Text tool, create another dynamic text field and position it in the middle of the Stage.
    This text field displays a message when you run the application and press the Left and Right soft keys. Your document's Stage should look like the following image:


    In a real-world application, you might want to use something other than ordinary text fields for the soft key labels, such as graphic or movie clip symbols.

    With the status text field still selected, in the Property inspector, type status in the Var text box.
    Create a key catcher button (see Creating a key catcher button). In the Actions panel, attach the following code to the button: // Handle Left soft keypress event
    on(keyPress "<PageUp>") {
    status = "You pressed the Left soft key.";
    // Handle Right soft keypress event
    on(keyPress "<PageDown>") {
    status = "You pressed the Right soft key.";

    In the Timeline, select Frame 1 on the Actions layer.
    In the Actions panel, type the following code: fscommand2("SetSoftKeys", "Left", "Right");
    fscommand2("FullScreen", true);

    The two parameters of the SetSoftKeys command--Left and Right, in this case--specify the labels that Flash Lite displays above the soft keys when the application is not being viewed in full-screen mode. In this case, the application uses the FullScreen command (see FullScreen in Flash Lite 1.x ActionScript Language Reference) to force the application to display in full-screen mode. Consequently, the values you choose for those parameters can be arbitrary text strings or expressions.

    fscommand2("SetSoftKeys", foo, bar);

    Select Control > Test Movie to test the application using Adobe Device Central.
    Click the Left and Right soft keys with your mouse, or press the Page Up and Page Down keys on your keyboard to test the application.

    this help is from adobe.
    Follow this help, sure you solve the problem..


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center