×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    5

    Game does not pause on alarm events, which negatively affects game..

    nokia 40 is impossible?
    I don't know alarm event api method.
    Thanks for answer.

    my 40 source .

    import javax.microedition.lcdui.Display;
    import javax.microedition.midlet.MIDlet;


    public class KungFuFighter extends MIDlet {
    Display disp;
    GameCanvas can;
    public KungFuFighter(){
    disp = Display.getDisplay(this);
    //can = GameCanvas(disp, this);
    }

    public void startApp(){

    if(can!=null){
    can.isRun=true;
    Thread rh=new Thread(can);
    rh.start();
    }else{
    try{
    can=new GameCanvas(disp,this);
    can.isRun=true;
    Display.getDisplay(this).setCurrent(can);
    Thread rh=new Thread(can);
    rh.start();
    }catch(Exception eo){System.out.println("err:"+eo);}
    }
    }

    public void pauseApp(){
    can.isRun=false;
    }
    public void destroyApp(boolean flag){
    disp = null;
    notifyDestroyed();
    }
    }

    //--------------------------------------------------------------------
    import javax.microedition.lcdui.*;
    import com.nokia.mid.ui.FullCanvas;

    public class GameCanvas extends FullCanvas implements Runnable{
    //-------------
    KungFuFighter fi;
    //~~~~~~~~~~~~~~~~~~~
    public GameCanvas(Display disp,KungFuFighter inObject){
    //~~~~~~~~~~~~~~~~~~~
    }
    public void run(){
    //~~~~~~~~~~~~~~~~~~~
    }
    public void keyPressed(int keyCode){
    //~~~~~~~~~~~~~~~~~~~
    }
    protected void hideNotify(){//call event mode
    //~~~~~~~~~~~~~~~~~~~
    }
    public void paint(Graphics g){
    //~~~~~~~~~~~~~~~~~~~
    }
    }
    Last edited by lhg96; 2004-06-11 at 17:01.

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Switzerland
    Posts
    78
    How about using showNotify and hideNotify for the canvas !!! That sure works with incoming calls. I have to admit I never checked it with alarms.

    -Sam

  3. #3
    Registered User
    Join Date
    Jul 2003
    Posts
    5

    incoming call is well. alarm's problem.

    i don't fiind 40 game .. alarm event be worked.
    But, Tmobile-usa want to make game in this rule.
    Very Very angry.
    I guess that nokia40 is impossible.

Posting Permissions

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