×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Jun 2010
    Location
    India
    Posts
    8

    how to get soft keys

    Hi

    We have to do some automation in swf file.For example, if video swf file is open,It will automatically Press LSK , The Three options(pause, stop, looping off)will open automatically, then it will automatically play that file, and pause the file, stop the file, looping of the file. ie.. it will emits left soft key immediately then the options are done, without clicking LSK in manually. Is there any standard API in as2.0 or 2.1 to emits LSK or MSK or RSK ?

    Please help me. .

    Thanks.

    Awaiting for yr kind Reply.

  2. #2
    Registered User
    Join Date
    Apr 2008
    Location
    India / Singapore
    Posts
    549

    Re: how to get soft keys

    You may use standard s/w engg practice..

    // This is inside the KeyListener
    if(Key.getKeyCode == ExtendedKey.SOFT1) {
    // this is where you handle the SOFT KEY press
    SoftKeyhandler();
    }..


    function SoftKeyhandler() {
    // Define what you want to do when Soft Key is pressed.
    }

    Now since all functionalities of the Soft Key Press are written outside in this function, you can simply call it
    Twitter - manikantan_k
    Just in --

  3. #3
    Registered User
    Join Date
    Jun 2010
    Location
    India
    Posts
    8

    Re: how to get soft keys

    Mani..

    Thanks for yr reply. but u thought that, handling of softkeys.. this will be pressed by user.. but this will be happen using automation.. user wont press any softkeys. ie.. if(Key.getKeyCode == ExtendedSoftKey.Soft1), is use for when user press Lsk, some functionality will happen...

    But I need, the function will be happen without pressing the softkeys. For Example "if video swf file is open,It will automatically Press LSK , The Three options(pause, stop, looping off)will open automatically, then it will automatically play that file, and pause the file, stop the file, looping of the file. ie.. it will emits left soft key immediately then the options will be show automatically, without clicking LSK in manually. Is there any standard API in as2.0 or 2.1 to emits LSK or MSK or RSK ?"


    Please reply me. Once again thanks

  4. #4
    Registered User
    Join Date
    Apr 2008
    Location
    India / Singapore
    Posts
    549

    Re: how to get soft keys

    The code design I have mentioned in my previous post allows you to do son.

    the SoftKEyHandler is written outside the keyListener and hence, you may call the SoftKeyHandler() function. This is equivalent to triggering a KeyPress. Whatever happens when a SoftKey is pressed, also happens now.
    Twitter - manikantan_k
    Just in --

  5. #5
    Registered User
    Join Date
    Jun 2010
    Location
    India
    Posts
    8

    Re: how to get soft keys

    Sorry..

    Can u give one same example. It will be very useful to me.


    once again thanks.

  6. #6
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Smile Re: how to get soft keys

    Hi rajalakshmi,

    If i am not mistaken, you must be asking about SIMULATING the Left Soft Key. If it is the case, than i have to say sorry that it is not possible to simulate any key using pure Flash Lite (AS 2). If this is not the case, then u can simply follow Mani's Advice.

    Best Regards,
    SajiSoft

  7. #7
    Registered User
    Join Date
    Jun 2010
    Location
    India
    Posts
    8

    Re: how to get soft keys

    Saji,

    You are almost there. Actually we are trying to send a signal/event to the existing application so that it can catch the signal and process the callback function. In other UI applications, there are user defined signals and we can emit them to get the required results. But in AS2, we are finding it hard to have a signal like that. If it is not possible directly in AS, what could be the workaround? The requirement is to emit the signal. In this case it is emitting soft key events. So if anyone knows how to do it, it would be of great help.

    Thanks
    Rajalakshmi

  8. #8
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Re: how to get soft keys

    A workaround for SIMULATING keypresses in Flash Lite is by integrating it with other languages like Symbian C++ , Python etc. Now, a question may arise in your mind that how to integrate Flash Lite using Symbian C++ or Python, simply by creating a local http server which responses to Flash Lite http requests to accomplish this task. Instead of explaining it all again, i recommend u to search this dibo as we discussed integrating Flash Lite with other languages many time. Moreover, i always like to give some hints and a link to open-source projects , So here are few for that purpose :
    1- Extending_Flash_Lite_with_Java_ME_or_Symbian_C++
    Note : JavaME cannot simulate keypress so, better to concentrate on extending Flash Lite using Symbian C++
    2- Flyer[ (open-source python project for extending flash lite)
    3- There are also Janus Symbian open-source symbian project for extending flash lite (search on google).

    Best Regards,
    SajiSoft

Similar Threads

  1. Soft Keys in Landscape
    By maldman in forum Mobile Java General
    Replies: 0
    Last Post: 2010-03-12, 16:15
  2. GameCanvas and Soft keys
    By cookie_man in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2007-07-16, 12:36
  3. Handle Soft Keys
    By ashbhatia in forum Symbian User Interface
    Replies: 2
    Last Post: 2005-02-07, 09:40
  4. Using non-soft keys
    By zivgr in forum Mobile Java General
    Replies: 3
    Last Post: 2003-05-18, 14:42
  5. Soft Keys
    By Nokia_Archive in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2002-05-15, 19:51

Posting Permissions

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