Discussion Board

Results 1 to 2 of 2
  1. #1
    If i press the key 5, my sprite has to Jump and again it comes to its original position eventhough the key (5) was continuosly pressed. How to do it?
    if any one knows that plz...reply me soon .... thanx in advance....

  2. #2
    Registered User adilb's Avatar
    Join Date
    May 2007
    Posts
    13
    Hi daisy_deepa
    The best way to do key mapping is not to write the code directly in the function keyPressed() instead what u do is u can just set aflag in the keyPressed function depending on which key was pressed meaning you will have 12 different flags for 12 differnet keys i think these will be enough for your game ...later in your code where u make the character jump u can check if this flag is set and make the character jump and also u can make a return from this function when the character state has yet not been standing or whatever it is...you dfinetly must be knowing what the character state is like jumoing or standing..so make a return from the function jump() until its jumping...also do not forget to reset the flag to false in the keyreleased() function ......this will not only solve your problem but also will make ur key response much more faster.

Similar Threads

  1. Grid: help PLZ (Urgent)
    By diptivs in forum Symbian C++
    Replies: 3
    Last Post: 2008-01-01, 03:49
  2. problem in voice record ( URGENT plz )
    By valiant123 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2007-05-16, 07:01
  3. Experts plz guide for ImportBusinessCardL
    By Shilpa13 in forum Symbian C++
    Replies: 0
    Last Post: 2006-12-02, 07:23
  4. Plz tell me easy method to cut image from the strip
    By mwm786 in forum Mobile Java General
    Replies: 1
    Last Post: 2005-02-01, 10:12
  5. plz give me Nokia Mobile Server Services API and Library 1.0
    By sridhar_ratna in forum General Messaging
    Replies: 0
    Last Post: 2003-05-27, 04:17

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved