Adding a timer to a game

I created a game. It's not a quiz, but i tell the users they have 60 seconds to complete it. How do i create a timer with 60 seconds to add to the slide. if they finish within the 60 seconds then their fine. it takes them to a new screen. If they run out of time I will give them one more chance. if they run out of time a second time it will direct them to another screen that basically says they failed.
Any and all help will be appreicated.
Thanks!

@Rod, there is an extra 2 seconds before the jump occurs with the Timer and the Hourglass interaction. So, if you have a time of 60secs, it will take 62secs before the jump occurs. Those two seconds are meant to show a warning text, but would have preferred to have exact timing. You  know I'm a control freak
@muse24 you can use that interaction, if you take into account my previous comment to Rod. But you have two possible situations: first time the jump will show a warning (could also be done with the text that you can attach to the interaction) and then you want a second chance. That is more of a problem than the timing itself, because you'll have to return all your images to the original place. And you'll need again a conditional action to achieve the two situations, because the timer cannot have an advanced action attached to it, only a Jump action. This means that the conditional action will have to triggered by the On Enter event of the slide you are jumping to.
Lieve, AKA Lilybiri

Similar Messages

  • Adding a time stamp

    How do I add a time stamp to video clips using the date and time the video was taken?

    GreenRoom
    What version of Premiere Elements are you using and on what computer operating system is it running.
    Premiere Elements (any version) does not have a built in feature for "adding a time stamp".
    What you can do is use the DVDate Plug-in for Premiere Elements for that task. Please see
    http://dvdate.ru/
    Please read details of the DVDate Plug-in in Item 0014 of my Premiere Elements 12 Daily Discovery blog post
    ATR Premiere Elements Troubleshooting: Premiere Elements 12 Daily Discoveries
    We will be looking forward to news of the outcome.
    Thank you.
    ATR

  • ITunes added extra time to a track

    iTunes added extra time to a track after transferring the song from my computer.  What do I do to to transfer the song correctly and remove the extra (several minutes) of dead air that iTunes added to the end of the track?

    Well....
    First of all, let me confirm exactly what you are doing.
    I notice you say iTunes is not recognising the change. So when you play the song in iTunes, it does not stop at the new time you've entered, is this correct? Or
    is it playing okay in iTunes, but not on your iPod? If this is what's happening, you have Synced your iPod after the change, haven't you? (Any changes you make in iTunes while the iPod is connected to iTunes will almost certainly not be activated on the iPod until you do another Sync.)
    (If you manually manage the music on your iPod, you will need to remove the track from the iPod and then put it back on again. Putting it back on should cause the newly revised stop time to be on your iPod.)
    So if your stop time is shown (in iTunes) as 2:52, but the track is not stopping at that time - in iTunes - then I suggest you do a repair of iTunes. To repair iTunes, download iTunes and go through the instal procedure. (Do not delete or remove the existing iTunes.) Once the instal procedure sees the existing iTunes, you should see an option to either repair or start new, choose the repair option.
    I've had to use the repair iTunes option myself, a few weeks ago, and it fixed the issue I was having. Can't remember what the issue was though!
    Finally, if the track plays okay in iTunes but not on the iPod after a new Sync, the only thing I can suggest is a Restore of your iPod. This will remove everything from the iPod and the next Sync put back what it finds in your library. If you manually manage, you will need to put everything back on yourself.

  • I keep getting my contacts added each time i sync causing me to have duplicate contacts

    Dulicate contacts. everytime i sync my Ipad and Iphone i get the same contacts added each time.
    Help

    Hi,
    You may have to disable '''Site Preferences''' in '''Tools''' ('''Alt''' + '''T''') > '''Options''' > '''Privacy''' > '''Settings'''..., if it is enabled (ticked).
    [https://support.mozilla.org/en-US/kb/Options%20window%20-%20Privacy%20panel?as=u Privacy Panel]
    https://www.mozilla.org/en-US/firefox/new/

  • Adding a timer Please help (Huge Duke dolla reward!)

    I am trying to make a timer for my game class so that after 3 seconds if you dont click anything you lose the game.
    I have been trying to figure this out for days
    This prolly can be done by starting the timer here and saying if timer reaces 3 seconds game ends, and that everytime you click a button timer restarts.
    Please I need help how do I do this?
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    * The Main Class of the Simon Game
    * @version 1.0
    public class Game
         private JTextArea scoreTextArea;
         private JFrame scoreFrame;
         private Simon simon;
         private Player player;
         private HighScores highScores;
         private GUI gui;
         private JLabel titleLabel;
         private JButton OKButton;
          * Constructor for the Game class
         private Game()
             gui = new GUI(this);
             simon = new Simon();
             player = new Player();
             highScores = new HighScores(true);
          * The Main method, used to start the program in the JVM
         public static void main(String[] args)
             Game game = new Game();
             game.play();        
          * Creates the highscore gui.
         private void makeHighScoreGui()
            //Displays a seperate frame for the highscore.
             scoreFrame = new JFrame("High Scores");
             scoreFrame.addWindowListener(new WindowAdapter() {
             public void windowClosing(WindowEvent we) { System.exit(0); }
             Container contentPane = scoreFrame.getContentPane();
             contentPane.setLayout(new BorderLayout());
             JPanel gridPanel = new JPanel();
             gridPanel.setLayout(new GridLayout(1,3));
             JPanel centerPanel = new JPanel();
             titleLabel = new JLabel("Hall of Fame ");
            contentPane.add(titleLabel, BorderLayout.NORTH);
             OKButton = new JButton("OK");
             contentPane.add(OKButton, BorderLayout.SOUTH);
             OKButton.addActionListener(new ActionListener(){
               public void actionPerformed(ActionEvent e){System.exit(0);}
             scoreTextArea = new JTextArea("\n \n \n");
             centerPanel.add(scoreTextArea);
             scoreTextArea.setFont(new java.awt.Font("Arial", Font.BOLD, 16));
             //adds it into a grid so that it's centered
             gridPanel.add(new JPanel());
             gridPanel.add(centerPanel);
             gridPanel.add(new JPanel());
             contentPane.add(gridPanel, BorderLayout.CENTER);
             scoreFrame.pack();
             scoreFrame.setVisible(true);   
          * The method called from main
         public void play()
             System.out.println("**********************");
             System.out.println("NEW GAME OF SIMON SAYS");
             System.out.println("**********************");
             //main game loop, executes as long as the program runs for
             while(true)
                  try{ Thread.sleep(1000);} catch(Exception e){};
                  //simon's turn to say some colors
                  System.out.println("Simon Says:");
                  gui.display(simon.say());
                  //now its the user's turn to repeat Simon
                  //goes through a loop as it needs to capture multiple characters
                  for(int i=0; i < simon.getTurn(); i++)
                      gui.changeLabel("color "+ (i+1) + " of " + simon.getTurn() + ":");
                      char charInput = gui.getInput();
                      //player has got the guess wrong if this branch is entered
                      if(simon.checkGuess(charInput) == false)
                            System.out.println("Wrong!");
                            //the score should be stored if it beats all the other top scores
                            if(player.getScore() > highScores.getLowestScore())
                                System.out.println("High Score! Enter your name:");
                                player.setName(gui.getName());
                                highScores.add(player);
                            //finish the game, save, and exit
                            System.out.println("GAME OVER!");
                            makeHighScoreGui();
                            gui.hide();
                            scoreTextArea.setText(highScores.toString());
                            scoreFrame.pack();
                            highScores.saveHighScores();                      
                        // player has got the guess correct if this branch is taken
                        else
                            //the player got the color correct
                            System.out.println("Correct!");
                    //the player got the whole sequence correct, increase the score
                    player.incScore();
                    //send the player's score to the GUI class as a string
                    gui.setScore(player.getScore() + "");
    }Help would be much appreciated.
    Message was edited by:
    Gwat
    Message was edited by:
    Gwat

    Well, I don't know because I've never used the Swing timer, and I'm not sure what game you're trying to write. You say "Simon Says" but it sounds more like that old electronic game Simon, or maybe both or maybe neither.
    But let's assume that it's like the old electronic game Simon. The point of the game is to press the same buttons that the game lighted up, in the same order. Let's assume the delay you want is the time between button presses or the last light lighting.
    The way I'd do it is:
    First, create a gameplay object that has as state a sequence to follow, and 4 buttons, and a "last time" number, representing the number of milliseconds since epoch.
    When the game is started...
    The last time value is set to infinity, or a time far in the future anyway.
    Then a TimerTask is created, and scheduled to every tenth of a second. It gets the current time, then if the current time minus the "last time" is over some threshhold value, it ends the game.
    LOOP: a sequence is created, one longer than the previous sequence. It's a sequence of buttons.
    The sequence is played.
    The "last time" value is set to the current time.
    Each button press triggers a method. The method first checks to make certain that it represents the next number in the sequence. (One way to do this by the way is to represent the sequence with a queue, and remove the first item from the queue, and compare with the button. If they don't match, the game ends; and when the queue is empty, it's time to loop back up to the LOOP label above.) After it checks the next number in the sequence, it sets "last time" to the current time.
    End loop.
    That's it.
    So in this scenario, the timer task doesn't get scheduled for the length of the timeout. Instead it gets scheduled for a fraction of the timeout length, and when it's called it checks to see if the timeout has passed. You'd create this when you start the game.
    Hope this helps.

  • [svn:osmf:] 13557: Fixing problem where a lingering TraitAggregationHelper causes elements to be added multiple times on ParallelDisplayObjectTrait .

    Revision: 13557
    Revision: 13557
    Author:   [email protected]
    Date:     2010-01-17 10:05:12 -0800 (Sun, 17 Jan 2010)
    Log Message:
    Fixing problem where a lingering TraitAggregationHelper causes elements to be added multiple times on ParallelDisplayObjectTrait.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/composition/ParallelDisplayObjectTrait.as

    Revision: 13557
    Revision: 13557
    Author:   [email protected]
    Date:     2010-01-17 10:05:12 -0800 (Sun, 17 Jan 2010)
    Log Message:
    Fixing problem where a lingering TraitAggregationHelper causes elements to be added multiple times on ParallelDisplayObjectTrait.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/composition/ParallelDisplayObjectTrait.as

  • IPad time restrictions for games

    Our schools are giving each student a personal iPad they will keep through each grade.  I need an app that will allow restrictions on time spent playing games but leave books, browser, and apps from teachers enabled.  Does it exist?? Can't find one.

    Most such apps require jailbreaking or are very limited, but I've seen this one mentioned:
    https://parentkit.co
    I don't know anything about it myself since the signup procedure is not one I could do just for a test. Might be worth looking into, though.
    Regards.

  • I keep having to install flash player 11 every time i play games.whats wrong?

         Almost every day i am playing one zinga game or another.during an upload of an game it will freeze and i will be asked to download the newest adobe flash player so the game will function properly.the rest of that day every thing will be fine.the next day the same thing will happin again.the download always works fine and the games all function fine after the download.this has happined four times now.i am an little confused and concerned.

    windows seven with all of the up dates to this time point.i use
    internet explorer ie9.but i also use google chrome and am finding my game play to work just fine on google.also i was just trying to take an survey and the site told me that i did not have the latest flash player installed and was asking me to download it.that would make it about eight times now.
    From: ʇɐb ɹəuəllıʍ <[email protected]>
    To: prhuds00 <[email protected]>
    Sent: Tuesday, November 8, 2011 5:09 PM
    Subject: i keep having to install flash player 11 every time i play games.whats wrong?
    Re: i keep having to install flash player 11 every time i play games.whats wrong? created by ʇɐb ɹəuəllıʍ in Installing Flash Player - View the full discussion
    What is your operating system & version?
    What is your web browser & version?
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4015076#4015076
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4015076#4015076. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Installing Flash Player by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • TS1424 Hello! Tell me, why I paid two times for one game? Stray Souls: Dollhouse Story - Collector's Edition HD, Collector's Edition???

    Hello! Tell me, why I paid two times for one game? Stray Souls: Dollhouse Story - Collector's Edition HD, Collector's Edition???

    Check your purchase history. The second charge may be for unlocking someting in the game or might be in-game items.

  • 3 questions-1)easy-images.2)hard-building a timer in a game.3)medium

    hello to all the java canons...
    1)Can anyone give me a code of image cuting.the problem is that i need to cut an image but not in a square shape,i need to cut it as a trpeze and i didnd found find in the api a method that recives 4 x point and 4 y poins to cut an image in a shape of a trapeze.
    2)I have 2 classes:one is JPanel and the other is JApplet.I want to build a timer in a game which gives a player a period of time to play,and if he didnt the game ends.i thoght to build a timer in the JPanel class and to paint a line which is getting bigger every second and when the line ends the player lost.how do the JPanel class know when the player played and stop the animation(the JApplet class has an actionlistener method),because the timer running stayes in the JPanel class until the timer ends...help....give me ideas...
    3)I need to upload a gif image to a JButton,i tried the code in the tutorial and it didnt work,can anyone give me a code that he wrote and it worked???
    thanks in advance....

    In response to your first question I recommend following this line into the turorial:
    java tutorial >> 2D Graphics >> Displaying Graphics With Graphics2D >> and from there follow the links to Transforming Shapes, Text, and Images and Clipping the Drawing Region.
    The first section on Transforming... will show how to use the AffineTransform class to shear. The second shows how to use the clip methods found in the api of the Graphics and Graphics2D classes.
    For questions 2 and 3:
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.net.URL;
    import javax.swing.*;
    import javax.swing.Timer;
    public class QuestionDemo extends JApplet
        public void init()
            String fileName = "images/dukeWaveRed.gif";
            URL url = getClass().getResource(fileName);
            ImageIcon icon = new ImageIcon(url);
            JButton gifButton = new JButton(icon);
            JPanel buttonPanel = new JPanel();
            buttonPanel.add(gifButton);
            GamePanel panel = new GamePanel();
            Container cp = getContentPane();
            cp.setLayout(new GridBagLayout());
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.gridwidth = gbc.REMAINDER;
            gbc.insets = new Insets(5,0,5,0);
            cp.add(buttonPanel, gbc);
            cp.add(panel, gbc);
            cp.add(panel.getUIPanel(), gbc);
        public static void main(String[] args)
            JApplet applet = new QuestionDemo();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(applet);
            f.setSize(400,400);
            f.setLocation(200,200);
            applet.init();
            applet.start();
            f.setVisible(true);
    class GamePanel extends JPanel
        final int PAD;
        int time;
        Timer timer;
        Color color;
        final int
            delay = 250,
            interval = 60;
        public GamePanel()
            PAD = 30;
            color = Color.black;
            time = 0;
            timer = new Timer(delay, new ActionListener()
                int timeLimit = interval * 1000;  // milliseconds
                public void actionPerformed(ActionEvent e)
                    time++;
                    if(time > timeLimit/delay)
                        color = Color.red;
                        Toolkit.getDefaultToolkit().beep();
                        timer.stop();
                    repaint();
            setPreferredSize(new Dimension(300,200));
            setBackground(Color.white);
        public void paintComponent(Graphics g)
             super.paintComponent(g);
             Graphics2D g2 = (Graphics2D)g;
             g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                 RenderingHints.VALUE_ANTIALIAS_ON);
             int w = getWidth();
             int h = getHeight();
             double elapsed = time * (w - 2*PAD) * delay/(interval*1000);
             double x = PAD;
             double y = h - PAD - 8;
             g2.setPaint(color);
             g2.fill(new Rectangle2D.Double(x, y, elapsed, 8));
        public JPanel getUIPanel()
            final JButton
                start = new JButton("start"),
                stop = new JButton("stop");
            ActionListener l = new ActionListener()
                public void actionPerformed(ActionEvent e)
                    JButton button = (JButton)e.getSource();
                    if(button == start)
                        if(!timer.isRunning())
                            time = 0;
                            color = Color.black;
                            timer.start();
                            repaint();
                    if(button == stop)
                        if(timer.isRunning())
                            timer.stop();
            start.addActionListener(l);
            stop.addActionListener(l);
            JPanel panel = new JPanel();
            panel.add(start);
            panel.add(stop);
            return panel;
    }

  • I have just added a time machine to my iMac and it is saying it will take 11 days to do the first back up.  Any ideas?

    I have just added a time machine to my iMac and it is saying it will take 11 days to do the first back up.  Any ideas?  It is only 355GB but is being backed up  wirelessly but 11 days?
    Help.

    Hi lajetidreaming, I'm in the same boat; "See you in 8 days".
    As LaPastenague says, use an ethernetcable for the initial backup.
    And I will add; Since TimeMachine don't accept any interruptions during the initial backup, make a small backup first. That is - exclude a number of 'secundary' folders like music etc.
    When you have one backup completed, TimeMachine is much more forgiving about interrupts, rebooting your Mac and so.
    Good luck!

  • My added hour to NFL recorded games is going away

    For two weeks now, I have been trying to record the NFL New England Patriots games.  As always I added a hour to the DVR recording because the game always runs late.  For two weeks in a row, the added hour goes away, and I don't get to watch the end of the game.  For this past weekend game, I set up the recording about 5 days before the game.  On Saturday, 12/17, I check the recording and the extra hour was gone.  I added it again, checked the recording and it showed the game was to be recorded with 60 extra minutes added to the end time.  However, sure enough the DVR failed to record the extra 60 minutes of the game.
    I have been recording with extra minutes for years, so I know what I am doing.  The DVR is removing the extra minutes from my recording.
    Help.

    Perfpix
    Hi, I am sorry, I know that is frustrating. What I usually do with live sporting events is I record the event and the show after. That doesn't explain why it is not retaining the setting to record the extra hour. I can always reset the box which will delete any settings you have (it will not delete recordings), in case there is a glitch on your box. If you want to go that route please send me a private message with your contact information.
    Peter C
    Peter_VZ
    Verizon Support
    Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or Plan.

  • Flash 10.1 Restarts all the time in Facebook games

    Win XP Pro Sp 3
    256MB Mem
    Problum with IE7 So I upgraded to IE 8 and same problum
    New Windows Install (4 Months)
    When I use a progrem/game that used Flash. the windoe will close all of sudden sometimes I can play for a ewhile and some times it happens every 3 Min.
    With IE 8. it reopens a new window after the origenal windo closes and reloads the screen.
    I only have a few Progrems loaded in this computer it is a Cleane computer and I use windows Essentials Softwhere.
    So this is my 2nd string about this

    Anyone Please help I have my Web pages that use flash reloadding all the
    time I cant use anything at this point
    I did update from IE7 to IE 8 and no change???

  • External hard drive, time machine and games

    I have a seagate external I've been using with my g5 iMac as a time machine backup. kids got guitar hero and spore for xmas, and it is playable only on my wife's intel macbook, which simply lacks the hard drive space for them. what I would like to do is take my external and hook it up to the macbook and install those games on the external without wiping, reformatting or otherwise repartitioning that external. Is this possible? am I being silly? is it ok to just hook it up, install and go with it while leaving my time machine backup untouched? or is something going to have to be sacrificed to make it happen?
    thanks for the help all

    TM will not be affected, other than the space dedicated to t.
    As to the applications you want to install, if they allow you to install to anything other than the startup device, then install to the external.

  • Adding a Time Capsule to an existing AEBS

    Hi, thanks in advance for any advice. I've been reading Apple's "Designing Networks" doc and digging around the forums for days and haven't been able to find all the pieces that add up to a solution for my situation.
    I have an existing wireless network using an AEBS (802.11g). My DSL modem and HP LaserJet via Ethernet are both connected.
    I just bought a Time Capsule for backup, and I'm trying to add it to this existing network. I would have simply replaced the old AEBS entirely but suddenly I can no longer use the phone jack near the printer. So one of the wireless units has to be in one room, with the DSL modem, and the other wireless unit will end up with the HP printer connected.
    I've tried adding the TC to the existing network (not WDS), keeping the AEBS as the main base station connected to the DSL modem; the TC shows up on the network. However, I have been unable to "find" the printer that's connected to the TC LAN ethernet port.
    --Should I start from scratch and create a WDS network--is that only way to get the HP printer to show up? (I found one other post about HP ethernet printing in the Graphite/Snow forum; but their solution didn't work for some reason)
    --Since I'm using a TC and an older AEBS, should the TC be set as the main base station or doesn't it matter?
    --Does the DSL modem have to be connected to the main base station or can it be connected to a remote or relay device (and thus allow my laptop and desktop to connect)?
    I hope that's all clear enough, and thanks very much for any advice!

    Hello drm1029. Welcome to the Apple Discussions!
    I've tried adding the TC to the existing network (not WDS), keeping the AEBS as the main base station connected to the DSL modem; the TC shows up on the network. However, I have been unable to "find" the printer that's connected to the TC LAN ethernet port.
    I believe that the AirPorts only support sharing a printer connected to its USB port when the AirPort is configured to "join an existing wireless network" as a wireless client. I don't think printers connected to it LAN port will work this way.
    --Should I start from scratch and create a WDS network--is that only way to get the HP printer to show up?
    Yes, and again, that would be based on my statement above for the reason.
    --Since I'm using a TC and an older AEBS, should the TC be set as the main base station or doesn't it matter?
    It really won't matter as the WDS can only operate in the 802.11g radio mode when using "mixed mode" base stations.
    --Does the DSL modem have to be connected to the main base station or can it be connected to a remote or relay device (and thus allow my laptop and desktop to connect)?
    It must be connected to the main base station in the WDS. When properly configured devices will be able to gain Internet access from any of the base stations in the WDS.

Maybe you are looking for

  • IPhoto won't open and makes my macbook pro log me out!

    The other day I used my camera's memory card to add new photos onto my iPhoto.  I had never done this before; usually I plug my camera into my computer via a usb cord.  The import seemed to go well and I was able to look at the photos I had added.  B

  • Amber update for Lumia 720

    When we get amber updates for Lumia 720, in India? Do we need to install fm or it comes along with the software itself? Any updates for transferring music files via Bluetooth? Moderator's note: We have amended the title of this post as well as its re

  • Audition Import / Export to/from other DAWs

    Well its done! AATranslator is finally finished. http://www.aatranslator.com.au/ is where you will find it. Its been 3 months in the making and as I mentioned previously its not donationware but it is a fully functional demo only limitation is the nu

  • Separate Discussion Forum for Oracle Repository now available!

    Questions regarding Oracle Repository (installation problems, runtime problems, usage issues, etcetera) can now be posted to the new forum called 'Oracle Repository'. Click on 'Discussion Groups' on top of this page, and look for 'Oracle Repository'

  • Hot to get the manager

    Hi,       I am working on HR ABAP. My requirement is to find the manager of a particular employee.      I am very new to OM. Can any body explain the procedure how to get the manager of an employee.        Send the code also so that I can get some id