• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with Timer for splash screen  RSS feed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Does anyone know how to use timer class in MIDP 1.0? I have a splash (implemented using alert) for which I set alrt_splash.setTimeout(50). Even after 5 secs the screen doesn't moveforward to the next one. I have also set display.setCurrent(alrt_splash, frm_login). Can anyone tell me how to make this splash screen automatically disappear and show the login form?
Here's the code:
-------------------------------------
in the startApp() I have given this:
Alert alrt_splash = new Alert("Welcome","",image,AlertType.CONFIRMATION);
display.setCurrent(alrt_splash, frm_login);
alrt_splash.setTimeout(50);
-------------------------------------------------
The only way it goes to the next screen is when I click on the "done" button that appears below from the "AlertType.Confirmation" Is there any other alternate way to do this?
-Kate
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kate,
I think 50 milliseconds is too short for the alert screen.
If you don't specify setTimeout, the next screen should appear few seconds after the Alert.
 
Kate Wilson
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Phoum Lib,
I tried with 1000, 15000 msecs.. still the timer doesn't work. I get a "done" button at the bottom of the image and I "have" to use this itself to navigate to the next screen. i also tried removing the setTimeout() command.. the alert doesn't go to the login page after a few secs. Is there any way I can get rid of the done button? It automatically comes when i use alert.
Any other option?
-Kate
[ April 07, 2004: Message edited by: Kate Wilson ]
 
Phoum Lib
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kate,
you should use AlertType.INFO instead of AlertType.CONFIRMATION
 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kate,
The following link about how to create splash screens should answer all of your questions:
Building Splash Screens
wireless.java.sun.com has some great technical articles and tips that might help to answer some of your other J2ME questions as they arise.
Regards,
Greg
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kate,
I'm using the following code:

... and I call as follows:

I hope it helps.
Fernando Gomes
fernando.gomes@bigfoot.com
mobile:+55(11)9993-2760
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!