Stop to Main Menu?

Would love it if someone could explain to me how to get the action of hitting the stop button to take you back to the main menu (menu 1) instead of taking you out of the disk altogether or taking you to the jacket picture. Does that make sense?
Cheers, MJ

Hi Miranda - welcome to the discussions!
You're finding out that the remote control buttons are not all programmable in the way you would want. The stop button is a case in point - it is defined as the button to stop playback completely and will only ever stop the disc. Instead of using 'Stop' you need to get used to using the 'menu' button or the 'Title' button to get you to a menu.
The menu button is used when playing a track to take you to whatever menu you wish within your disc structure (depending on which track you are in), but pressing it a second time will resume playback of the last track that played, from the point you left it. If you weren't in a track the menu button will not move you out of the menu, and will probably do nothing.
The Title button can be used to access the first menu (the Title) menu of your disc from wherever, but you can also program it to go to any menu when it is pressed. You can only define one menu as the Title menu for the disc.
So - time to learn about what the buttons on the remote are set up to do, and un-learn all you knew about stop buttons!

Similar Messages

  • Animation keeps running through. I want it to stop on main menu so i can click buttons

    animation keeps running through. I want it to stop on main menu so i can click buttons which navigate to different scenes. Please help I am a noob.
    here are screen shots of what i have going on:
    Main time line "home" menu
    script in frame 1
    script in frame 48
    scene 2 animation of shape tween which isnt supposed to run all the way through past the home page. I want it to animate but only after i click the button to do so.
    script for this scene
    scene 3 which is causing all the issues i think? supposed to be able to drag boxes. but it just runs through without stopping when i play it.
    here is the compiler errors:

    If you removed the stop() from scene 2 it will not stop there it will return to wherever "home" is.
    If you intend to have the timeline stop at some frame, then you need to place a stop() command in that frame, or use a gotoAndStop() command.
    If you are going to use scenes  be consistent with the way you write the goto commands. The use of is rarely recommended - instead, use different sections of the timeline of just one scene, or use movieclips and control their visibility, or a combination of both.
    If you continue to have issues, try simplifying first - build/add the navigation for one section at a time instead of trying to get it all in one shot.

  • When I stop a movie, it doesn't go back to the main menu.

    I am experiencing a very frustrating situation.
    I have burned a DVD with 2 short movies on it.
    When I play either of them all the way through, after they're over, it returns automatically to the main menu, which is what I want.
    However, when I STOP either of them anywhere during the playing, it does NOT return to the main menu. It just stays on a black screen.
    This situation happens on my Mac DVD Player, and also on external DVD players connected to a TV.
    Let's say I am watching the 1st movie, I don't like it and I want to watch the 2nd one on the same DVD. I logically press STOP, but it doesn't bring me back to the main menu. If I press "Menu" or "title", it doesn't work either.
    Is there something on the "Map function" window that I should do?
    If not, is there any other solution?
    Many thanks in advance for any help.

    Ok, don't press STOP, just press "menu" or "title" without pressing stop.
    BTW, I tested both a commercial DVD (Indiana Jones and the Last Crusade) and and a iDVD disk in my Panosonic player and on my Mac with the Apple DVD player.
    On the Panosonic Player: If I press Stop on either DVD, I go to a blank screen. If I press menu once and wait a sec or two, both DVDs go back to the main menu.
    On the Apple DVD player: If I press Stop on either DVD, I go to a blank screen, and pressing "menu" gives me the "not permitted" warning for both DVDs.....
    So It seems like fro me, iDVD works just like the commercial DVD on both the Mac and the DVD player.....
    John B

  • My Apple TV stops and returns to main menu during movie playback and photo slide show via homesharing. I have a second Apple TV in another room that works fine.

    My Apple TV stops and returns to main menu during movie playback and photo slide show via homesharing. I have a second Apple TV in another room that works fine.

    Intermittent problems are often a result of interference. Interference can be caused by other networks in the neighbourhood or from household electrical items.
    You can download and install iStumbler to help you see which channels are used by neighbouring networks so that you can avoid them, but iStumbler will not see household items.
    Refer to your router manual for instructions on changing your wifi channel.

  • Stop button to Main menu

    Ok this is probably gonna have a simple solution, but I have a relatively simple DVD project for my mates band - one main menu with 2 buttons linking to a film each and a 3rd button linking to a menu containing 10 buttons that each link to an audio only track. Everything is working good but the only thing that I would like to happen is when one of the films is being played and the 'stop' button is pressed on the DVD remote at any point throughout the film, I'd like it to return to the main menu. I already have the 'end jump' on both films set to the main menu. Sounds simple but I can't figure this one out!
    Oh yeah DVDSP3
    Thanks
    Simon

    You cant program the stop button - maybe in higher end systems. the stop button does just that - stop the disc from playing.

  • HT204370 I JUST purchased a movie then when i stopped it to go to the main menu my movie was gone.

    I just purchased a movie then when I stopped it to go to the main menu the movie was gone

    I just did, it says that all purchases have been downloaded for this account.

  • How to stop ipod touch dropping out from reading email, then displaying main menu

    My wife's Ipod touch (4 or 5 years old) has worked fine for years, but now when reading emails, without touching the screen or any controls, the ipod drops out of the application and displays the main menu after a few seconds. Have rebooted it a couple of times, but the fault persists.
    Ipod is a 16Gb with 10.4 Gb available
    Does anyone know how I can solve this problem ?

    Many thanks for your quick reply. The full reset has cured the problem.
    Thanks again

  • Chapters won't stop and return to main menu

    I am creating a DVD with seven chapters created in Final Cut Pro. I created Chapter markers and durations in FCP. DVD Studio recognizes and links successfully with the chapters I set, but the chapters don't end, they just keep playing through the subsequent chapters until the piece is over. At the end of each chapter I need the DVD to go back to the main menu.
    Any suggestions of what I can do in either FCP or DVD Studio Pro?

    they just keep playing through the subsequent chapters until the piece is over.
    This is normal for DVD. If you watch a film you would want this to happen.
    As you have been told you can set Chapter End jumps but the user will still be able to skip to the next chapter unless you control things by settying UOPs.
    You may want to make a Track for each of your Vids in future. Look into Stories if you want other options like play all etc.

  • FM Radio stops being shown on main menu - Sleek Ph

    I have had my Sleek Photo for a few weeks now and am very pleased with it to date, however I have suddenly lost the FM Radio on the main menu and therefore have no access to the radio. Has anyone got a solution to this. I have already tried reloading the firmware with no effect.

    I have the same issue on TWO Vision:Ms. Here is my thread (with no solution yet):?http://forums.creative.com/creativel...message.id=393

  • Adding submenus to an xml driven main menu

    Hi there folks,
    I have been following and bastardising a computer arts tutorial for a dynamic flash site, its a really good tutorial and I'd like to keep going with that format/style, but I'm pretty new to the whole scripting thing and am finding it a bit of a headache, so was wondering if any kind souls would help me work out how to add submenus to the code below. the main menu button is a movie file(btn_projects_main) consisting of a button (button) and a text box(txt) and is 3 frames long to allow for the different states:
    What I'm looking for is a set of sub menus which load horizontally below the main menu buttons, here is the code which has been altered slightly (thanks to Ned Murphy for his help and patience with that) any help would be hugely appreciated :
    // Setup some initial variables
    // Hide the button that will display a web link
    _root.theUrl._visible = 0;
    // Hide the image icons in the project loader
    // The image icons are simply there to make it easier for you to
    // select the movieClip from the main timeline.
    _root.img_project.photo_icon._visible = 0;
    _root.img_project.img_holder.photo_icon2._visible = 0;
    // name of the folder for all thumbs and swf files
    _root.imageFolder = "project_files/";
    // Create arrays ready for the xml data
    namesArray = new Array();
    linksArray = new Array();
    descriptionsArray = new Array();
    filesArray = new Array();
    // Load XML doc
    objXML = new XML();
    objXML.onLoad = loadXML;
    objXML.ignoreWhite = true;
    // The name of your XML file
    objXML.load("ss_flash_testing.xml");
    // onLoad XML function
    function loadXML(success) {
    if (success) {
    // If the XML loads successfully, count how many projects there are in the file.
    _root.projectCount = this.firstChild.childNodes.length; // PROJECT node in XML file
    // Then run a function that builds arrays out of the XML data.
    SS_Arrays();
    } else {
    // If the xml data did not load, show message on stage by populating the description field.
    _root.description = "Error: Could not load XML";
    function SS_Arrays() {
    for (var count = 0; count < _root.projectCount; count++) {
    var nodeObj = objXML.firstChild.childNodes[count];
    namesArray[count] = nodeObj.attributes.name;
    descriptionsArray[count] = nodeObj.attributes.description;
    linksArray[count] = nodeObj.attributes.link;
    filesArray[count] = nodeObj.attributes.file;
    // run the function to create the thumbnail and list view buttons
    SS_createButtons();
    var spaceBetween = 60; // space between buttons
    function SS_createButtons() {
    btn_projects_main._visible = 0;
    btn_xPos = _root.btn_projects_main._x;
    btn_yPos = _root.btn_projects_main._y;
    for (count = 0; count < namesArray.length; count++) {
    duplicateMovieClip(btn_projects_main, "btn_projects" + count, count);
    this["btn_projects" + count]._x = btn_xPos;
    this["btn_projects" + count]._y = btn_yPos;
    this["btn_projects" + count].txt.autoSize = "left";
    this["btn_projects" + count].txt.text = namesArray[count];
    //set the button width
    this["btn_projects" + count].btn._width = this["btn_projects" + count].txt._width;
    // determine the new x placement value based on the current button's width
    btn_xPos = btn_xPos + this["btn_projects" + count]._width + spaceBetween;
    // anything from here down I have no idea if it's needed, so I left it
    SS_load_project(0);
    tellTarget(_root.btn_projects0){
    gotoAndPlay(3);
    _root.curButton = "0";
    SS_createButtons(); // to kick off the function
    function SS_load_project(arrayNumber){
    // Progress bar stuff: This creates a new movie clip on the stage
    // and shows the progress of the image or file being loaded
    _root.createEmptyMovieClip("progressBar_mc", 1000);
    progressBar_mc.createEmptyMovieClip("bar_mc", 1001);
    // Using the flash drawing method, draw a box 550px wide by 2px deep
    // with a fill of red (FF0000)
    with (progressBar_mc.bar_mc) {
    beginFill(0xFF0000, 100);
    moveTo(0, 0);
    lineTo(660, 0);
    lineTo(660, 2);
    lineTo(0, 2);
    lineTo(0, 0);
    endFill();
    _xscale = 0;
    // set the X & Y positions of the progress bar manually
    //progressBar_mc._x = 160;
    //progressBar_mc._y = 218;
    // Or set them to be the same X & Y as the project file/image.
    progressBar_mc._x = img_project._x;
    progressBar_mc._y = img_project._y;
    // set the initial width of the bar to zero
    var mclListener:Object = new Object();
    mclListener.onLoadStart = function(target_mc:MovieClip) {
    progressBar_mc.bar_mc._xscale = 0;
    // increase the width (xscale) of the bar as the file loads
    mclListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
    progressBar_mc.bar_mc._xscale = Math.round(bytesLoaded/bytesTotal*100);
    // Make sure the clip being loaded doesn't play until it is fully loaded.
    // If you want content to stream as it loads remove the following 3 lines
    tellTarget(_root.img_project.img_holder){
    stop();
    // once the file has loaded, remove the progress bar from the stage
    mclListener.onLoadComplete = function(target_mc:MovieClip) {
    progressBar_mc.removeMovieClip();
    // Plays the loaded clip once it's fully loaded.
    // If you want content to stream as it loads remove the following 3 lines
    tellTarget(_root.img_project.img_holder){
    play();
    // Load the project file onto the stage by loading it into a movieClip (which in this case
    // is inside another one img_project > img_holder.
    var image_mcl:MovieClipLoader = new MovieClipLoader();
    image_mcl.addListener(mclListener);
    // load the clip onto the stage into a movieClip
    image_mcl.loadClip(_root.imageFolder + _root.filesArray[arrayNumber], img_project.img_holder);
    // Populate the dynamic text fields on the main stage with the project title & description
    _root.prj_name = _root.namesArray[arrayNumber];     
    _root.prj_description = _root.descriptionsArray[arrayNumber];
    // if the URL is present for this project, populate & show the link
    if(_root.linksArray[arrayNumber] != "") {
    _root.btn_link.webAddress = _root.linksArray[arrayNumber];
    _root.btn_link._visible = 1;
    } else {
    _root.btn_link._visible = 0;
    // Reset the last button
    tellTarget("_root.btn_projects" + _root.curButton){
    gotoAndPlay(1);
    // Replace the current button variable with this projects id/number     
    _root.curButton = arrayNumber;
    stop();

    No ideas at al guys?
    I just need a couple of pointers as in what to code needs adding and where, I've created a new movie clip with the name subs (instance sub1), surely its now just a matter of connecting that instance to the sub_projects node in the xml - I guess it also needs to be linked to a parent project button + told to only run when that parent is clicked. I've downloaded loads of different code from various sources, but as there seem to be lots of different ways to write the same commands, its feeling really confusing.
    Any help or feed back would be massively appriciated

  • Hi I was using whatsapp on my iPhone5.I was not able go to the main menu by pressing the center button so I hold on to the button for 2 seconds.Then the whole display turned out to be black

    I was not able go to the main menu from whatsapp by pressing the center button so I hold on to the button for 2 seconds.Then the whole display turned out to be black & white. how can i fix it?

    Hello monicaa003,
    Thanks for participating in the Apple Support Communities.
    If your iPhone display turned black and white after holding down the Home button for 2 seconds, first try pressing the Home button again to go to the main menu (Home screen.)
    For reference, holding down the Home button for 2 seconds will trigger Siri if that feature is enabled:
    About Siri - Apple Support
    If pressing the Home button doesn't return you to the main menu, try restarting or resetting your iPhone:
    Restart or reset your iPhone, iPad, or iPod touch - Apple Support
    Additionally, if Whatsapp is not responding or working as expected, see the troubleshooting steps at this link:
    If an app you installed unexpectedly quits, stops responding, or won’t open - Apple Support
    Best Regards,
    Jeremy

  • Iphone crashes and goes back to main menu

    my iphone has begun crashing when i play music and then try to go to the phone or safari apps. the whole phone doesn't crash but the music stops abruptly and it goes to the main menu instead of where i want it to go. i've seen a few other posters with this problem but wanted to let others know that it's not so isolated an incident.

    If resetting and power cycling the iphone does not resolve the issue, you might want to restore the iphone.
    Here is a link to an article on the Apple support site the will help in restoring the iphone.
    http://docs.info.apple.com/article.html?artnum=305744

  • Trying to get gnome-main-menu-svn (SLAB) installed from AUR

    Having soem troubles installing gnome-main-menu-svn (SLAB) installed from the AUR using yaourt. After getting all the dependencies figured out, there still seems to be problems.
    Here is what I have so far:
    $ yaourt -S gnome-main-menu-svn
    ==> Resuming previous build
    ==> Downloading gnome-main-menu-svn PKGBUILD from AUR...
    ==> Last 5 comments ordered by date (asc):
    Comment by: pressh on 20070926 [10:17:48]
    - beagle depends > makedepends
    - added instructions for beagle/tracker search functionality to install file
    Comment by: pressh on 20071206 [08:22:07]
    cleanup
    Comment by: raul_nds on 20080118 [02:07:13]
    How do I use this? It doesn't appear in the applets menu
    Comment by: raul_nds on 20080118 [02:24:48]
    Never mind. This removes dbus-sharp after the installation, and then requires it as a dependency. I missed the message
    Comment by: laloch on 20080427 [15:12:48]
    current revision (451) doesn't work with networkmanager 0.6.6 from extra. Revision 401 from http://svn.gnome.org/svn/gnome-main-menu/branches/gnome-2-22/ works for now.
    First Submitted: Tue, 28 Aug 2007 14:30:49 +0000
    Last Updated: Thu, 06 Dec 2007 08:22:07 +0000
    gnome-main-menu-svn 350-2 (Unsupported): Novell SLED Gnome main-menu applet
    ==> gnome-main-menu-svn dependencies:
    - glib2 (already installed)
    - gtk-doc (already installed)
    - libgnome (already installed)
    - gnome-panel (already installed)
    - libgtop (already installed)
    - dbus-sharp (already installed)
    - networkmanager (already installed)
    - hal (already installed)
    - wireless_tools (already installed)
    - gnome-menus (already installed)
    - avahi (already installed)
    - libbeagle (already installed)
    - libgail-gnome (already installed)
    - gnome-screensaver (already installed)
    - intltool (already installed)
    - pkgconfig (already installed)
    - subversion (already installed)
    - gnome-common (already installed)
    - versionpkg (already installed)
    - beagle (already installed)
    ==> Edit the PKGBUILD (recommended) ? [Y/n] ("A" to abort)
    ==> ----------------------------------------------
    ==>n
    ==> WARNING: This PKGBUILD contains install file that can be dangerous.
    gnome-main-menu.install
    ==> Edit gnome-main-menu.install (recommended) ? [Y/n] ("A" to abort)
    ==> ----------------------------------------------
    ==>n
    ==> Continue the building of 'gnome-main-menu-svn'? [Y/n]
    ==> ----------------------------------------------
    ==>y
    ==> Building and installing package
    mkdir: cannot create directory `/var/abs': Permission denied
    ==> WARNING: Unable to write in /var/abs/local/yaourtbuild/gnome-main-menu-svn directory. Using /tmp directory
    ==> Searching new CVS/SVN/GIT revision for gnome-main-menu-svn
    ==> retrieving latest revision number from svn... 467
    ==> newer revision detected: 467
    ==> modifying PKGBUILD to pkgver=467...
    ==> Determining latest svn revision...
    -> Version found: 467
    ==> Making package: gnome-main-menu-svn 467-2 (Fri May 16 16:11:44 ADT 2008)
    ==> Checking Runtime Dependencies...
    ==> Checking Buildtime Dependencies...
    ==> Retrieving Sources...
    ==> Validating source files with md5sums...
    ==> Extracting Sources...
    ==> Removing existing pkg/ directory...
    ==> Entering fakeroot environment...
    ==> Starting build()...
    At revision 467.
    ==> SVN checkout done or server timeout
    ==> Starting make...
    /usr/bin/gnome-autogen.sh
    checking for autoconf >= 2.53...
    testing autoconf2.50... not found.
    testing autoconf... found 2.62
    checking for automake >= 1.9...
    testing automake-1.10... found 1.10.1
    checking for libtool >= 1.4.3...
    testing libtoolize... found 2.2
    checking for glib-gettext >= 2.2.0...
    testing glib-gettextize... found 2.16.3
    checking for intltool >= 0.25...
    testing intltoolize... found 0.37.1
    checking for pkg-config >= 0.14.0...
    testing pkg-config... found 0.23
    checking for gtk-doc >= 1.0...
    testing gtkdocize... found 1.10
    Checking for required M4 macros...
    Checking for forbidden M4 macros...
    Processing ./configure.in
    Running libtoolize...
    libtoolize: putting auxiliary files in `.'.
    libtoolize: copying file `./ltmain.sh'
    libtoolize: You should add the contents of the following files to `aclocal.m4':
    libtoolize: `/usr/share/aclocal/libtool.m4'
    libtoolize: `/usr/share/aclocal/ltoptions.m4'
    libtoolize: `/usr/share/aclocal/ltversion.m4'
    libtoolize: `/usr/share/aclocal/ltsugar.m4'
    libtoolize: `/usr/share/aclocal/lt~obsolete.m4'
    Running glib-gettextize... Ignore non-fatal messages.
    Copying file mkinstalldirs
    Copying file po/Makefile.in.in
    Please add the files
    codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4
    progtest.m4
    from the /aclocal directory to your autoconf macro directory
    or directly to your aclocal.m4 file.
    You will also need config.guess and config.sub, which you can get from
    ftp://ftp.gnu.org/pub/gnu/config/.
    Running intltoolize...
    Running gtkdocize...
    Running aclocal-1.10...
    Running autoconf...
    Running autoheader...
    Running automake-1.10...
    Processing ./trunk/configure.in
    Running libtoolize...
    libtoolize: You should add the contents of the following files to `aclocal.m4':
    libtoolize: `/usr/share/aclocal/libtool.m4'
    libtoolize: `/usr/share/aclocal/ltoptions.m4'
    libtoolize: `/usr/share/aclocal/ltversion.m4'
    libtoolize: `/usr/share/aclocal/ltsugar.m4'
    libtoolize: `/usr/share/aclocal/lt~obsolete.m4'
    Running glib-gettextize... Ignore non-fatal messages.
    Copying file mkinstalldirs
    Copying file po/Makefile.in.in
    Please add the files
    codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4
    progtest.m4
    from the /aclocal directory to your autoconf macro directory
    or directly to your aclocal.m4 file.
    You will also need config.guess and config.sub, which you can get from
    ftp://ftp.gnu.org/pub/gnu/config/.
    Running intltoolize...
    intltoolize: 'po/Makefile.in.in' is out of date: use '--force' to overwrite
    make: *** No targets specified and no makefile found. Stop.
    ==> ERROR: Build Failed.
    Aborting...
    Error: Makepkg was unable to build gnome-main-menu-svn package.
    Any help is appreciated. I really love that menu!

    I ran yaourt as root to install gnome-main-menu-svn, and it got past that part. Looks like that was a problem with permissions that also needs to be fixed.
    Now its telling me that I don't have a high enough version of libnm-glib, it is asking for >= 0.7.0, and I have 0.6.6. I checked the the repos and there does not seem to be a 0.7.0 version or higher available. A suggestion on the gnome-main-menu-svn package page makes a suggestion, but Im not sure how to go about it
    current revision (451) doesn't work with networkmanager 0.6.6 from extra. Revision 401 from http://svn.gnome.org/svn/gnome-main-men … nome-2-22/ works for now.
    So I either need to get revision 401 from the svn instead, or get networkmanager and its libs at version 0.7.0
    How could I go about doing any of these things. I am not familiar with SVN, so go easy on me.
    EDIT:
    I found a package called networkmanager-beta which seems to be version 0.7.0. Trying to install that with yaourt is unsuccessful as well.
    NetworkManager-nm-netlink.o: In function `nm_netlink_get_default_handle':
    nm-netlink.c:(.text+0x38): undefined reference to `nl_handle_alloc_nondefault'
    nm-netlink.c:(.text+0x63): undefined reference to `nl_handle_set_pid'
    collect2: ld returned 1 exit status
    make[3]: *** [NetworkManager] Error 1
    make[3]: Leaving directory `/tmp/yaourt-tmp-root/aur-networkmanager-beta/networkmanager-beta/src/NetworkManager-0.7.0/src'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/tmp/yaourt-tmp-root/aur-networkmanager-beta/networkmanager-beta/src/NetworkManager-0.7.0/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/tmp/yaourt-tmp-root/aur-networkmanager-beta/networkmanager-beta/src/NetworkManager-0.7.0'
    make: *** [all] Error 2
    ==> ERROR: Build Failed.
    Aborting...
    Error: Makepkg was unable to build networkmanager-beta package.
    Also had to do yaourt as root to get that far. Why is it that when you use yaourt as root, it advises you to switch to a normal user, and then the packages will not install correctly unless you do?
    So far I have been very turned off by the AUR
    Last edited by lungdart (2008-05-17 12:59:29)

  • Need help on mobile gaming development basic  {working the game main menu}

    package Assignment1;
    import java.io.IOException;
    import java.util.Random;
    import javax.microedition.lcdui.Canvas;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.game.GameCanvas;
    import javax.microedition.lcdui.game.Sprite;
    public class a1Canvas extends GameCanvas implements Runnable{
        private Display display;
        private Sprite ufoSprite;
        private Image backgroundImage;
        private long frameDelay;
        private int ufoX;
        private int ufoY;
        private int ufoXDir;
        private int ufoXSpeed;
        private int ufoYSpeed;
        private Random rand;
        private Sprite[] roidSprite = new Sprite[3];
        private boolean gameOverState;
        //constructor
        public a1Canvas(Display display){
            super(true);
            this.display = display;
            frameDelay = 33;
            gameOverState = false;
        public void start(){
            display.setCurrent(this);
            //start the animation thread
             rand = new Random();     // Initialize the random number generator
             ufoXSpeed = ufoYSpeed = 0; // Initialize the UFO and roids sprites
            try {
                backgroundImage = Image.createImage("/background.jpg");
                ufoSprite = new Sprite(Image.createImage("/ufo.png"));
                //initialise sprite at middle of screen
                ufoSprite.setRefPixelPosition(25,25);
                ufoX = (int)(0.5 * (getWidth()- ufoSprite.getWidth()));
                ufoY = (int)(0.5 * (getHeight()- ufoSprite.getHeight()));
                ufoSprite.setPosition(ufoX, ufoY);
                Image img = Image.createImage("/Roid.png");
                roidSprite[0] = new Sprite(img, 42, 35);   //create 1st frame-animated asteroid sprite
                roidSprite[1] = new Sprite(img, 42, 35);
                roidSprite[2] = new Sprite(img, 42, 35);
            } catch (IOException ex) {
                System.err.println("Failed to load images");
            Thread t = new Thread(this);
            t.start();
        public void run() {
            while (!gameOverState){
                update();
                draw(getGraphics());
                try{
                    Thread.sleep(frameDelay);
                }catch(InterruptedException ie){}
            gotoMainMenu(getGraphics());
        private void draw(Graphics graphics) {
            //clear background to black
            graphics.setColor(0, 0, 0);
            graphics.fillRect(0, 0, getWidth(), getHeight());
            //draw the background
            graphics.drawImage(backgroundImage, getWidth()/2, getHeight()/2, Graphics.HCENTER | Graphics.VCENTER);
            ufoSprite.paint(graphics);
            for(int i=0;i<3;i++){
                roidSprite.paint(graphics);
    flushGraphics(); //flush graphics from offscreen to on screen
    private void update() {
    // Process user input to control the UFO speed
    int keyState = getKeyStates();
    if ( (keyState & LEFT_PRESSED) != 0 )
    ufoXSpeed--;
    else if ( (keyState & RIGHT_PRESSED) != 0 )
    ufoXSpeed++;
    if ( (keyState & UP_PRESSED) != 0 )
    ufoYSpeed--;
    else if ( (keyState & DOWN_PRESSED) != 0 )
    ufoYSpeed++;
    ufoXSpeed = Math.min(Math.max(ufoXSpeed, -8), 8);
    ufoYSpeed = Math.min(Math.max(ufoYSpeed, -8), 8);
    ufoSprite.move(ufoXSpeed, ufoYSpeed); // Move the UFO sprite
    checkBounds(ufoSprite); // Wrap UFO sprite around the screen
    // Update the roid sprites
    for (int i = 0; i < 3; i++) {
    roidSprite[i].move(i + 1, 1 - i); // Move the roid sprites
    checkBounds(roidSprite[i]); // Wrap asteroid sprite around the screen
    // Increment the frames of the roid sprites; 1st and 3rd asteroids spin in opposite direction as 2nd
    if (i == 1)
              roidSprite[i].prevFrame();
    else
              roidSprite[i].nextFrame();
    // Check for a collision between the UFO and roids
    if ( ufoSprite.collidesWith(roidSprite[i], true) ) {
    System.out.println("Game Over !");
    gameOverState = true;
    }//if
    }//for
    public void stop(){
    gameOverState = true;
    private void checkBounds(Sprite sprite) {
    // Wrap the sprite around the screen if necessary
    if (sprite.getX() < -sprite.getWidth())
         sprite.setPosition(getWidth(), sprite.getY());
    else if (sprite.getX() > getWidth())
         sprite.setPosition(-sprite.getWidth(), sprite.getY());
    if (sprite.getY() < -sprite.getHeight())
         sprite.setPosition(sprite.getX(), getHeight());
    else if (sprite.getY() > getHeight())
         sprite.setPosition(sprite.getX(), -sprite.getHeight());
    private void gotoMainMenu(Graphics graphics) {
    graphics.setColor(0, 0, 0);
    graphics.fillRect(0, 0, getWidth(), getHeight());
    graphics.setColor(255, 0, 0);
    graphics.drawRect(0, 0, getWidth()-1, getHeight()-1);
    graphics.setColor(255, 255, 255);
    graphics.drawString("GAME NAME", getWidth()/2 -50, 30, Graphics.LEFT | Graphics.TOP);
    graphics.setColor(255, 0, 0);
    graphics.drawString("Main Menu", getWidth()/2 -50, 50, Graphics.LEFT | Graphics.TOP);
    graphics.setColor(0, 255, 0);
    graphics.drawString("Start Game", getWidth()/2 , 80, Graphics.LEFT | Graphics.TOP);
    graphics.drawString("Instructions", getWidth()/2 , 110, Graphics.LEFT | Graphics.TOP);
    flushGraphics();
    int keyState = getKeyStates();
    if ( (keyState & FIRE_PRESSED) != 0 ){
    System.out.println("game start");
    gameOverState = false;
    The problem i am facing is :
    the FIRE button is not functioning, i put a system.out.println and it didnt print.
    i am unsure whether i put the key input listener at the correct function
    this button is supposed to start the game again.
    What i want to do :
    i want to display the main menu when i launched the game
    when game is over, it will display back to the main menu again
    when i press the fire button it will play the game again.
    i hope someone can help me on this :)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    kdoom wrote:
    The problem i am facing is :
    the FIRE button is not functioning, i put a system.out.println and it didnt print.
    i am unsure whether i put the key input listener at the correct function
    this button is supposed to start the game again.
    What i want to do :
    i want to display the main menu when i launched the game
    when game is over, it will display back to the main menu again
    when i press the fire button it will play the game again.
    i hope someone can help me on this :)You didn't have to create a whole new post just for the formatted code, silly. You could have just replied in the old thread. Anyway:
    Step through the program and think about what each line is doing. Most importantly:
        public void run() {
            while (!gameOverState){
                update();
                draw(getGraphics());
                try{
                    Thread.sleep(frameDelay);
                }catch(InterruptedException ie){}
            gotoMainMenu(getGraphics());
        }This says that while the game is being played, update( ), then draw( ). When the game is over, call gotoMainMenu( ).
       private void gotoMainMenu(Graphics graphics) {
            //do a bunch of graphics stuff
            int keyState = getKeyStates();
            if ( (keyState & FIRE_PRESSED) != 0 ){
                System.out.println("game start");
                gameOverState = false;
        }This says to do a bunch of graphics stuff, and then to check the key states. If fire is being pressed, print something out and set gameOverState to false. This check only happens once. When the state is being checked, most likely the user will not be pressing any keys, so the code is done.
    Also, simply setting the gameOverState variable to false outside of the loop you use it in won't do anything. For example:
    boolean doLoop = true;
    int count = 0;
    while(doLoop){
       count++;
       if(count > 10){
          doLoop = false;
    doLoop = true;Would you expect that second doLoop = true to start the while loop over?

  • Angry birds rio quit working on my ipad.  When I try to start the game, it shuts down completely and goes to the main menu screen.  This started when I downloaded the latest app.  The other angry bird games still work.  I really need help.

    Angry birds rio quit working when I installed the latest app.  I even uninstalled it and started over.  When I try to start the game, it goes back to the main menu.  I need help badly but in simplest of terms so I'll be able to follow.

    Have you tried closing the app completely ? From the home screen (i.e. not with Angry Birds 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Angry Birds app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then you could try a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

Maybe you are looking for

  • How to Decalre Global Variable in UDF

    Hi All, Can you please help me, how to declare a Global variable in UDF. I am using SAP PI 7.0. Regards, Manian.

  • How to sms for group of skype id

    how to sms to a group of skype id 's from normal mobile ???? pl help me in getting solution. EDIT : title case changed.

  • Connecting XBox 360 Live to Verizon netbook

    I purchased an XBox 360 Live for my son for Christmas.  I cannot get it to connect. We originally had Verizon Wireless Broadband w/ an internal modem. I went and purchased a Verizon USB760 to get service and also a Cradlepoint Router from Best Buy. N

  • JDBC : ODBC Datasource

    Currently we are using the jdbc:odbc to connect to a database. basically - forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); props.setProperty("user", "xxx"); props.setProperty("password", "xxx"); return DriverManager.getConnection(URL, props);

  • Error Message: JBO-26018

    Error Message: JBO-26018: Cannot insert a new row with no attribute set in entity Kssegtobjbasdat I have the following error. Could you help me to solve the problem. When I run that on JDeveloper it works but when I run on the webserver it doesn't: T