×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    8

    Post Moving Focus from one image to other image.

    Hi all,

    I draw the image using Paint method in canvas, i wanna to move focus from one image to other while i clicking the arrow button. if i press right arrow it should focus next image which is in right of the image ,if i click twice it should focus the
    second image of right side , similarly for the left. can anyone tell me how to do this...

    Thanks in Advance...

  2. #2
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    307

    Re: Moving Focus from one image to other image.

    The Canvas has methods called keyPressed(int keyCode), keyReleased(int keyCode) and keyRepeated(int keyCode).

    You can get the "direction" of keyCode by the method called getGameAction(int keyCode). It returns the standard values called Canvas.LEFT, Canvas.RIGHT, etc., upon the appropriate keyCode.

    The Canvas is not supporting the "key-repeated" events, like on Symbian. It's keyRepeated(int keyCode) method is activated when user holds the key down, but such "double-clicking" functionality may be easily emulated by measuring time periods between two key events. Let's say, if the period between two the same key events was less than 1 second, it can be interpreted as a "key-repeating".

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    8

    Post Re: Moving Focus from one image to other image.

    Thanks ,can u tell me if i click the Focused image it should do some action ,how to do this .....


    thanks once Again.,

  4. #4
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    307

    Re: Moving Focus from one image to other image.

    I guess the click on the focused image would be equal to Canvas.FIRE key code, and it should be processed in the same manner as Canvas.LEFT, RIGHT, etc.

Similar Threads

  1. --- ???save image problem??? ---
    By ferenn in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2007-10-01, 14:33
  2. Opening a JPEG Image
    By ummarbhutta in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2007-02-15, 07:34
  3. how to cut some part of Image
    By mshouab in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-08-04, 09:05
  4. HELP: Mutable Image to Immutable Image?
    By rj_cybersilver in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2005-03-26, 10:58
  5. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 16:31

Posting Permissions

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