You Are Here:

Community: Developer Discussion Boards

#1 Old How can I create an epilog and main menu? - 2006-10-18, 18:00

Join Date: Sep 2006
Posts: 7
dimitrist
Offline
Registered User
How can I create an epilog in the start of a program and main menu after the demo(epilog in the start of the program) ?
please give me an example like loading on startup of the program an image png, then load a graphical main menu, like a background image and options that you can select.
Reply With Quote

#2 Old Re: How can I create an epilog and main menu? - 2006-10-18, 20:29

Join Date: Mar 2003
Posts: 2,280
Location: Israel
shmoove
Offline
Forum Nokia Champion
Here's a free e-book that will take you through that and much more.

shmoove
Reply With Quote

#3 Old Re: How can I create an epilog and main menu? - 2006-10-23, 08:03

Join Date: Sep 2006
Posts: 7
dimitrist
Offline
Registered User
thanks alot for your help !! :))))
Reply With Quote

#4 Old Smile Re: How can I create an epilog and main menu? - 2006-10-24, 01:22

Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
peterblazejewicz
Offline
Super Contributor
@shmoove
excellent link,
thanks too!
Reply With Quote

#5 Old Re: How can I create an epilog and main menu? - 2006-10-24, 08:20

Join Date: Sep 2006
Posts: 7
dimitrist
Offline
Registered User
Well i don't want to make a game, but this tutorial is very helpful. My problem is that i don;t know if i had started in the right way. I would like a splash screen on the start of the program and then load the main menu. Any ideas?

Here is my code:
===============================================
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class LoadScreen extends MIDlet
{
private Display display;
private MyCanvas canvas;
public LoadScreen ()
{
display = Display.getDisplay(this);
canvas = new MyCanvas (this);
}
protected void startApp()
{
display.setCurrent( canvas );
}
protected void pauseApp()
{
}
protected void destroyApp( boolean unconditional )
{
}
public void exitMIDlet()
{
destroyApp(true);
notifyDestroyed();
}
class MyCanvas extends Canvas implements CommandListener
{
private Command exit;
private LoadScreen LoadScreen;
private Image image = null;
public MyCanvas (LoadScreen LoadScreen)
{
this. LoadScreen = LoadScreen;
exit = new Command("Exit", Command.EXIT, 1);
addCommand(exit);
setCommandListener(this);
try
{
image = Image.createImage("/Screen.png");
}
catch (Exception error)
{
Alert alert = new Alert("Failure",
"Can't open image file.", null, null);
alert.setTimeout(Alert.FOREVER);
display.setCurrent(alert);
}
}
protected void paint(Graphics graphics)
{
if (image != null)
{
graphics.drawImage(image, 0, 0,
Graphics.LEFT | Graphics.TOP);

}
}
public void commandAction(Command command, Displayable display)
{
if (command == exit)
{
LoadScreen.exitMIDlet();
}
}
}
}


===============================================
Please help me
Reply With Quote

#6 Old Re: How can I create an epilog and main menu? - 2006-10-27, 02:11

Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
peterblazejewicz
Offline
Super Contributor
Hi,

see Gopal's post:
http://discussion.forum.nokia.com/fo...ghlight=splash

hth,
regards,
Peter
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia