Uni Game project, need help

hi, i have an assignment for uni where i have to make a text game according to a given scenario, a part of the game has a bomb room and a bomb timer, where if the player doesent get the code right within 10 seconds the bomb explodes and the player has the choice to restart.
here is the code to the bomb, im not sure if the sleep method timer is causing the problems, it runs, but when you choose y to restart it just goes into this error:
Exception in thread "main" java.util.InputMismatchException
at java.util.Scanner.throwFor(Scanner.java:840)
at java.util.Scanner.next(Scanner.java:1461)
at java.util.Scanner.nextInt(Scanner.java:2091)
at java.util.Scanner.nextInt(Scanner.java:2050)
at hostage.Main.main(Main.java:134)
here is the code:
     boolean go = true;
     boolean countfinish = false;
     Scanner sc = new Scanner(System.in);
     int rn1, rn2, answer, sumofrn1rn2;
     boolean restart = true;
     System.out.println("you have entered the BOMB ROOM!!! solve the equasion within 10 seconds to defuse the bomb");
     System.out.println();
//below is the equasion to defuse the bomb     
rn1 = (int)(Math.random()*1000);
rn2 = (int)(Math.random()*1000);
     System.out.print(rn1);
     System.out.print(" + ");
     System.out.print(rn2);
     System.out.print(" = ");
     answer = 0;
     sumofrn1rn2 = (rn1+rn2);
     try
// the sleep method of the thread object is called
Thread.sleep(10000);
catch(InterruptedException e)
countfinish = true;
if (countfinish == true)
     if (sumofrn1rn2 != answer)
System.out.println("You faild, oh and your dead... Restart? (y/n)");
restart2 = sc.next().charAt(0);
if (restart2 == 'y')     
     Current_Room = "ROOM 1";
     System.out.println("Welcome to the Lobby!.....again....");
     answer = sc.nextInt();
     if (answer == rn1+rn2)
          System.out.println("You have defused the bomb... fewww...");
          //go back to lobby
any help would be appresiated, thank you

No problem. One thing that I noticed after testing it out for a bit more...
With those implementations, you only get 1 guess, which I suppose is accurate to real life. If you want them to be able to have multiple guesses then, here's some new implementation
import java.util.Timer;
import java.util.TimerTask;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Random;
public class BombGameTest
     private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
     private boolean failed = false;
     public static void main(String[] args)
          new BombGameTest().bombTest();
     public void bombTest()
          class ExplodeBomb extends TimerTask
               int timeLeft = 10;
               public void run()
                    if (timeLeft != 0)
                         System.out.println(timeLeft-- + "...");
                    else
                         System.out.println();
                         failed = true;
                         System.out.println("You failed to difuse the bomb, you are now dead. Restart? [y/n] ");
                         String tmp = "";
                         try
                              tmp = br.readLine();     //Like the Scanner.nextLine();
                         } catch(Exception ex) {}
                         if (tmp.toUpperCase().equals("Y"))
                              //run some restart method
                         else
                              System.exit(0);
          System.out.println("You have entered the BOMB ROOM!!! Solve the equation within 10 seconds to defuse the bomb.");
          System.out.println();
          Random randGen = new Random();
          int r1 = randGen.nextInt(1000);     //basically the same as the random() method
          int r2 = randGen.nextInt(1000);
          System.out.print(r1);
          System.out.print(" + ");
          System.out.print(r2);
          System.out.println(" = ? ");
          Timer t = new Timer();
          t.scheduleAtFixedRate(new ExplodeBomb(), 0,1000);
          int answer = 0;
          boolean incorrect = true;
          while (incorrect)
               try
                    answer = Integer.parseInt(br.readLine());
               } catch (Exception ex) {}
               if (answer == r1 + r2 && !failed)
                    t.cancel();
                    System.out.println("Congrats! You defused the bomb.");
                    incorrect = false;
}

Similar Messages

  • A Menu Applet Project (need help)

    The Dinner Menu Applet
    I would need help with those codes ...
    I have to write a Java applet that allows the user to make certain choices from a number of options and allows the user to pick three dinner menu items from a choice of three different groups, choosing only one item from each group. The total will change as each selection is made.
    Please send help at [email protected] (see the codes of the project at the end of that file... Have a look and help me!
    INSTRUCTIONS
    Design the menu program to include three soups, three
    entrees, and three desserts. The user should be informed to
    choose only one item from each group.
    Use the following information to create your project.
    Clam Chowder 2.79
    Vegetable soup 2.99
    Peppered Chicken Broth 2.49
    Chicken 12.79
    Fish 10.99
    Beef 14.99
    Vanilla Ice Cream 2.79
    Rice Pudding 2.99
    Cheesecake 4.29
    The user shouldn�t be able to choose more than one item
    from the same group. The item prices shouldn�t be visible to
    the user.
    When the user makes his or her first choice, the running
    total at the bottom of the applet should show the price of
    that item. As each additional item is selected, the running
    total should change to reflect the new total cost.
    The dinner menu should be 200 pixels wide �� 440 pixels
    high and be centered on the browser screen. The browser
    window should be titled �The Menu Program.�
    Use 28-point, regular face Arial for the title �Dinner Menu.�
    Use 16-point, bold face Arial for the dinner menu group titles
    and the total at the bottom of the applet. Use 14-point regular
    face Arial for individual menu items and their prices. If you
    do not have Arial, you may substitute any other sans-serif
    font in its place. Use Labels for the instructions.
    The checkbox objects will use the system default font.
    Note: Due to complexities in the way that Java handles
    numbers and rounding, your price may display more than
    two digits after the decimal point. Since most users are used
    to seeing prices displayed in dollars and cents, you�ll need to
    display the correct value.
    For this project, treat the item prices as integers. For example,
    enter the price of cheesecake as 429 instead of 4.29. That
    way, you�ll get an integer number as a result of the addition.
    Then, you�ll need to establish two new variables in place of
    the Total variable. Run the program using integers for the
    prices, instead of float variables with decimals.
    You�ll have the program perform two mathematical functions
    to get the value for the dollars and cents variables. First,
    divide the total price variable by 100. This will return a
    whole value, without the remainder. Then get the mod of the
    number versus 100, and assign this to the cents variable.
    Finally, to display the results, write the following code:
    System.out.println("Dinner Price is $ " + dollars +"." + cents);
    Please send code in notepad or wordpad to [email protected]
    Here are the expectations:
    HTML properly coded
    Java source and properly compiled class file included
    Screen layout as specified
    All menu items properly coded
    Total calculates correctly
    * MenuApplet.java
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    * @author Rulx Narcisse
         E-mail address: [email protected]
    public class MenuApplet extends java.applet.Applet implements ItemListener{
    //Variables that hold item price:
    int clamChowderPrice= 279;
    int vegetableSoupPrice= 299;
    int pepperedChickenBrothPrice= 249;
    int chickenPrice= 1279;
    int fishPrice= 1099;
    int beefPrice= 1499;
    int vanillaIceCreamPrice= 279;
    int ricePuddingPrice= 299;
    int cheeseCakePrice =429;
    int dollars;
    int cents=dollars % 100;
    //cents will hold the modulus from dollars
    Label entete=new Label("Diner Menu");
    Label intro=new Label("Please select one item from each category");
    Label intro2=new Label("your total will be displayed below");
    Label soupsTrait=new Label("Soups---------------------------");
    Label entreesTrait=new Label("Entrees---------------------------");
    Label dessertsTrait=new Label("Desserts---------------------------");
      *When the user makes his or her first choice, the running
         total (i.e. dollars) at the bottom of the applet should show the price of
         that item. As each additional item is selected, the running
         total should change to reflect the new total cost.
    Label theDinnerPriceIs=new Label("Dinner Price is $ "+dollars +"."+cents);
      *Crating face, using 28-point, regular face Arial for the title �Dinner Menu.�
         Using 16-point, bold face Arial for the dinner menu group titles
         and the total at the bottom of the applet & using 14-point regular
         face Arial for individual menu items and their prices.
    Font bigFont = new Font ("Arial", Font.PLAIN,28);
    Font bigFont2 = new Font ("Arial", Font.BOLD,16);
    Font itemFont = new Font ("Arial", Font.PLAIN,14);
    //Here are the radiobutton on the applet...
    CheckboxGroup soupsG = new CheckboxGroup();
        Checkbox cb1Soups = new Checkbox("Clam Chowder", soupsG, false);
        Checkbox cb2Soups = new Checkbox("Vegetable Soup", soupsG, true);
        Checkbox cb3Soups = new Checkbox("Peppered Chicken Broth", soupsG, false);
    CheckboxGroup entreesG = new CheckboxGroup();
        Checkbox cb1Entrees= new Checkbox("Chicken", entreesG, false);
        Checkbox cb2Entrees = new Checkbox("Fish", entreesG, true);
        Checkbox cb3Entrees = new Checkbox("Beef", entreesG, false);
    CheckboxGroup dessertsG = new CheckboxGroup();
        Checkbox cb1Desserts= new Checkbox("Vanilla Ice Cream", dessertsG, false);
        Checkbox cb2Desserts = new Checkbox("Pudding Rice", dessertsG, true);
        Checkbox cb3Desserts = new Checkbox("Cheese Cake", dessertsG, false);
        public void init() {
            entete.setFont(bigFont);
            add(entete);
            intro.setFont(itemFont);
            add(intro);
            intro2.setFont(itemFont);
            add(intro2);
            soupsTrait.setFont(bigFont2);
            add(soupsTrait);
            cb1Soups.setFont(itemFont);cb2Soups.setFont(itemFont);cb3Soups.setFont(itemFont);
            add(cb1Soups); add(cb2Soups); add(cb3Soups);
            cb1Soups.addItemListener(this);cb2Soups.addItemListener(this);cb2Soups.addItemListener(this);
            entreesTrait.setFont(bigFont2);
            add(entreesTrait);
            cb1Entrees.setFont(itemFont);cb2Entrees.setFont(itemFont);cb3Entrees.setFont(itemFont);
            add(cb1Entrees); add(cb2Entrees); add(cb3Entrees);
            cb1Entrees.addItemListener(this);cb2Entrees.addItemListener(this);cb2Entrees.addItemListener(this);
            dessertsTrait.setFont(bigFont2);
            add(dessertsTrait);
            cb1Desserts.setFont(itemFont);cb2Desserts.setFont(itemFont);cb3Desserts.setFont(itemFont);
            add(cb1Desserts); add(cb2Desserts); add(cb3Desserts);
            cb1Desserts.addItemListener(this);cb2Desserts.addItemListener(this);cb2Desserts.addItemListener(this);
            theDinnerPriceIs.setFont(bigFont2);
            add(theDinnerPriceIs);
           public void itemStateChanged(ItemEvent check)
               Checkbox soupsSelection=soupsG.getSelectedCheckbox();
               if(soupsSelection==cb1Soups)
                   dollars +=clamChowderPrice;
               if(soupsSelection==cb2Soups)
                   dollars +=vegetableSoupPrice;
               else
                   cb3Soups.setState(true);
               Checkbox entreesSelection=entreesG.getSelectedCheckbox();
               if(entreesSelection==cb1Entrees)
                   dollars +=chickenPrice;
               if(entreesSelection==cb2Entrees)
                   dollars +=fishPrice;
               else
                   cb3Entrees.setState(true);
               Checkbox dessertsSelection=dessertsG.getSelectedCheckbox();
               if(dessertsSelection==cb1Desserts)
                   dollars +=vanillaIceCreamPrice;
               if(dessertsSelection==cb2Desserts)
                   dollars +=ricePuddingPrice;
               else
                   cb3Desserts.setState(true);
                repaint();
        }

    The specific problem is that when I load he applet, the radio buttons do not work properly and any calculation is made.OK.
    I had a look at the soup radio buttons. I guess the others are similar.
    (a) First, a typo.
    cb1Soups.addItemListener(this);cb2Soups.addItemListener(this);cb2Soups.addItemListener(this);That last one should be "cb3Soups.addItemListener(this)". The peppered chicken broth was never responding to a click. It might be a good idea to write methods that remove such duplicated code.
    (b) Now down where you respond to user click you have:
    Checkbox soupsSelection=soupsG.getSelectedCheckbox();
    if(soupsSelection==cb1Soups)
        dollars +=clamChowderPrice;
    if(soupsSelection==cb2Soups)
        dollars +=vegetableSoupPrice;
    else
        cb3Soups.setState(true);What is that last bit all about? And why aren't they charged for the broth? Perhaps it should be:
    Checkbox soupsSelection=soupsG.getSelectedCheckbox();
    if(soupsSelection==cb1Soups) {
        dollars +=clamChowderPrice;
    } else if(soupsSelection==cb2Soups) {
        dollars +=vegetableSoupPrice;
    } else if(soupsSelection==cb3Soups) {
        dollars +=pepperedChickenBrothPrice;
    }Now dollars (the meal price in cents) will have the price of the soup added to it every time.
    (c) It's not enough to just calculate dollars, you also have to display it to the user. Up near the start of your code you have
    Label theDinnerPriceIs=new Label("Dinner Price is $ "+dollars +"."+cents);It's important to realise that theDinnerPriceIs will not automatically update itself to reflect changes in the dollars and cents variables. You have to do this yourself. One way would be to use the Label setText() method at the end of the itemStateChanged() method.
    (d) Finally, the way you have written itemStateChanged() you are continually adding things to dollars. Don't forget to make dollars zero at the start of this method otherwise the price will go on and on accumulating which is not what you intend.
    A general point: If you have any say in it use Swing (JApplet) rather than AWT. And remember that both Swing and AWT have forums of their own which may be where you get the best help for layout problems.

  • Student Project - Need Help With ViewPlatform Rotation

    Hello folks,
    I'm a student in Strathclyde University, Glasgow, and I'm currently doing a small project for one of my programming classes. I'm doing a 3D knots and crosses game but I'm having tremendous difficulty getting the rotation to work just the way I want it to. Let me decribe what I need.
    Visualise 27 cubes, arranged in a 3 x 3 x 3 structure, space out slightly: a 3D knots and crosses setup. I'm trying to get the ViewPlatform to rotate around the central cube in a spherical fashion.
    I also need this rotation to use the keyboard arrow keys, not the mouse because I am reserving the mouse for interaction using the PickMouseBehavior class as stated in my project specification.
    I have looked up various classes in the API: such as KeyNavigator, OrbitBehavior, and some VisAd class that isn't included with the Java3D API nor is it on the systems I have available at the university.
    The trouble is, all these classes that I have found do not rotate the way I need them to: as described above. They "turn left" and "turn right" the camera as opposed to "rotate left around" and "rotate right around" the central cube (i.e horizontal rotation of the camera on a wide circle around an object).
    They also "move forward" and "move backward" as opposed to "rise up around" and "drop down around" the central cube (i.e. vertical rotation on a wide circle around an object).
    I have previously tackled this problem by creating a dummy cube under the central cube using then attaching the "camera" to the dummy cube in the DarkBASIC programming language and wonder if this method is available using Java.
    I've thought about defining my own arrow key rotation class, but I have little idea how to go about doing that either.
    An additional bonus would be the ability to limit vertical rotation so as not to go over and upside-down the vertical limit.
    Any help would be appreciated.

    I appreciate the answer and I know about implementing a Behavior to do this particular function of the program: is this what you are suggesting?
    If so, could you provide some clarity onto how go about implementing a Behavior to do the type of rotations I stated in my first post? By clarity I mean a little bit more about the recipe for creating a Behavior: the API is lacking documentation on this I think.
    I'll go do a bit of reading on it and tell you where I get. Nonetheless, any further advice would be much appreciated.

  • I am having difficulty playing most pogo games and need help with it. I have down loaded the recent version of java and am still unable to get the games to load. Is someone able to please help me ? Thank- You

    I am seriously needing some help and guidance in getting my mac to help me play pogo games. I will be thrilled with any help to show and tell me what to do. Thank-You so much !

    Back up all data.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
    Select the login keychain from the list on the left side of the Keychain Access window. If your default keychain has a different name, select that.
    If the lock icon in the top left corner of the window shows that the keychain is locked, click to unlock it. You'll be prompted for the keychain password, which is the same as your login password, unless you've changed it.
    Right-click or control-click the login entry in the list. From the menu that pops up, select Change Settings for Keychain "login". In the sheet that opens, uncheck both boxes, if not already unchecked.
    From the menu bar, select
    Keychain Access ▹ Preferences ▹ First Aid
    If the box marked Keep login keychain unlocked is not checked, check it.
    Select
    Keychain Access ▹ Keychain First Aid
    from the menu bar and repair the keychain. Quit Keychain Access.

  • Flash Game Problem Need Help! Action-Script 2.0

    Im making a flash game its a sniper game btw and i am have a problem with after killing the target for it to go to the next frame. I have tried on(press) on(release) for buttons i hae tried lots of different stuff (1.3 hours of trying) and so i was wondering if you could help me out. and here the link to the download for the source .fla yes i uploaded it cuz i really need the help ! thanks for any help! http://fileape.com/?act=download&t=yz6Lhp0oDdAB-7whXWB62WIoACXMVgV7r1flbKy17aJZamyC-vXNFwx tZP6pwXV50NGk3XWK9anDa4m6tBfGEtPOZwKbuZFcaFyGyEGiYqeILdcvVuEZy3QVHX3xY6S170xapkdrZJN9lov4k hxeqJ4_S6aGRpNQWjTT3MhudPLa1ZBAi79CiPqX5kN835lD7vzAU0O6WJZaK6jZBROg2A,,
    or
    http://fileape.com/dl/2gI8YiSW9QGzIgAu
    if the top one doesnt work (the top one shouldnt have a time wait)
    Thanks for all help
    also please if you can find the problem itd be nice to know what it is

    I will not download the .fla - maybe if you hosted the .swf I would view it.
    to change frame use: gotoAndStop(<framenumber>);
    (without the < >, just a number for the fram).
    I recommend you use movieclips for buttons and place all code on the main timeline. For movieclips, give them an identifier name (bottom left int he properties box of the movieclip) then on the main timeline use:
    movieclipName.onRelease = function(){
    gotoAndStop(10);//change 10 to the frame you wish to go to. gotoAndPlay(10) plays from the frame.

  • Project -  need help rather quickly

    I am doing a 2 minute/ish long small project which will involve images flowing across the screen......with text which appears over them. Thats it taken down to basics.
    http://www.coremelt.com/products/products-for-final-cut-studio/imageflow-demo-re el.html
    is pretty much the effect i want to go for, but i am wondering if i can do those type of effects in FCP (i have about 3 weeks) without that plugin?
    If so can someone post some type of tutorials, to help a novice out.
    If not....i suppose i will need to buy the plugins in the video for £50.
    thanks

    Do you have only Final Cut Pro, or also Motion? This sort of animation can be done in either. But if you're not that familiar with the methods to set up the animations and managing all the tracks/objects involved it would certainly take a lot less time to use a canned animation tool like the one you linked to. It depends on whether you're getting paid to do this, I would imagine!

  • Java game app - need help on creating more adversaries

    HI all, this app is a simple game where the objective is to avoid incoming balls (adversaries) however at present I can only figure out how to get one ball on screen at a time. What I'd really like is, when a player hits 100 points, a second ball is spawned (thus making the game harder) I would like the same to occur at 200 points (3 balls), 400 pts (4 balls) and so forth. I am sure there is a simple way of doing this. what I have tried is creatin new instances of Ball, but to no avail.any help would be greatly appreciated.
    cheers
    /* A game that is Saucer-like
    * Phillip Wells
    //to do - make more balls when 100 points met
    import java.awt.*;
    import java.awt.Toolkit.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.geom.*;
    import java.util.concurrent.*;
    public class Saucer extends JFrame {
        public static final int WIDTH = 400;
        public static final int HEIGHT = 400;
        Image img;
        private PaintSurface canvas;
        public void init() {
            this.setSize(WIDTH, HEIGHT);
            this.setTitle("Saucer");
            canvas = new PaintSurface();
           img = Toolkit.getDefaultToolkit().getImage("space.gif");
            this.getContentPane().add(canvas, BorderLayout.CENTER);
            ScheduledThreadPoolExecutor executor =
                    new ScheduledThreadPoolExecutor(3);
            executor.scheduleAtFixedRate(new AnimationThread(this),
                    0L, 20L, TimeUnit.MILLISECONDS);
            setVisible(true);
        class AnimationThread implements Runnable {
            JFrame c;
            public AnimationThread(JFrame c) {
                this.c = c;
            public void run() {
                c.repaint();
        class PaintSurface extends JComponent {
            int saucer_x = 0; // start position of saucer
            int saucer_y = 180;
            int score = 0;
            Ball Ball;
            Color[] color = {Color.RED, Color.ORANGE,
            Color.MAGENTA, Color.ORANGE,
            Color.CYAN, Color.BLUE};
            int colorIndex;
            public PaintSurface() {
                addMouseMotionListener(new MouseMotionAdapter() {
                    public void mouseMoved(MouseEvent e) {
                        saucer_x = e.getX() -30;
                        saucer_y = e.getY() -0;
                Ball = new Ball(30);
            public void paint(Graphics g) {
                Graphics2D g2 = (Graphics2D)g;
                g2.setRenderingHint(
                        RenderingHints.KEY_ANTIALIASING,
                        RenderingHints.VALUE_ANTIALIAS_ON);
                        Shape saucer = new Ellipse2D.Float(
                        saucer_x, saucer_y, 60, 10); // saucer dimensions
                g2.drawImage(img, 0, 0, this);
                g2.setColor(color[colorIndex % 6]);
                if (Ball.intersects(saucer_x, saucer_y, 60, 10)
                && Ball.y_speed > 0) {
                    Ball = new Ball(20);
                    score -= 100;
                    colorIndex = 0;
                else if (Ball.getY() + Ball.getHeight() >= Saucer.HEIGHT)
                    Ball = new Ball(20);
                    score += 10;
                    colorIndex = 0;
                Ball.move();
                g2.fill(Ball);
                g2.setColor(Color.GREEN);
                g2.fill(saucer);
                g2.drawString("Score: " + score, 250, 20);      
                if (score == 20)
        class Ball extends Ellipse2D.Float {
            public int x_speed, y_speed;
            private int d;
            private int width = Saucer.WIDTH;
            private int height = Saucer.HEIGHT;
            public Ball(int diameter) {
                super((int)(Math.random() * (Saucer.WIDTH - 20) + 1),
                        0, diameter, diameter);
                this.d = diameter;
                this.x_speed = (int)(Math.random() * 5 + 5);
                this.y_speed = (int)(Math.random() * 5 + 5);
            public void move() {
                if (super.x < 0 || super.x > width - d)
                    x_speed = -x_speed;
                if (super.y < 0 || super.y > height - d)
                    y_speed = -y_speed;
                super.x += x_speed;
                super.y += y_speed;
    }

    On an off note, there are some things you can do here to make multiple balls much easier to create, track, and manage. One thing is that your Ball class should have a record of all properties that are in anyway related to a Ball object.
    I notice that you handle Ball color within your paint method. Your Ball class should have a Color field so every instance of Ball is aware of its color, and then your paint method can grab the necessary color from the object itself that it is painting. You wont need to keep a color index and color collection.
    Secondly, to track multiple balls you will need a collection object that holds multiple Ball objects. Everything in your paint method right now is looking at one instance of Ball because there is only one reference of Ball. Instead of doing it this way you can keep a number of Ball objects in an ArrayList lets say, and then create a for loop that iterates through element of the List, and performs operations on that ball, like grabbing its color, filling the shape, calling the Ball's move method.

  • Last Project -- Need Help, Please

    Okay, this is my last project, and I am struggling with it. The specification we were given was to write a program that reads in a file of dates and outputs the dates in descending order, using a priority queue. The PriorityQueue should implement the PriorityQueueInterface interface, and should implements a priority queue using a singly linked list. The list should be maintained in sorted order. This implementation should not use a heap.
    I have the code built, but when I run it is not reading my dates fully, and I get an error message. The LinkList is already built for us, but here is the rest of my code. First I input from my dates.txt:
    11/12/2000
    04/04/2004
    01/02/1998
    import java.io.*;
    public class DateDriver {
       public static void main(String[] args) throws IOException {
          PriorityQueue pq = new PriorityQueue();
          // ... read all Date objects from the file and enqueue them in the pq object
          BufferedReader in = new BufferedReader (new FileReader("C:/Users/April/Desktop/UMUC/CMIS241/Project4/Dates.txt"));
          Date date = new Date();
          date.input(in);
          while (!date.isNull()){
               pq.add(date);
               date = new Date();
               date.input(in);
               System.out.println(date);
          // ... dequeue the pq object and display the Date objects
          System.out.println("The dates in descending order are: ");
          while (!pq.isEmpty()){
               date = (Date) pq.dequeue();
               date.output(System.out);
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.PrintStream;
    public class Date implements InOutputable, Comparable {
       // ... define monthNames as a ?static final? array of String objects
       //  initialize the array with the first 3 characters of each month
         static final String[] monthNames = {null, "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
              "Oct", "Nov", "Dec"};
       // ... define the instance variables of class Date, i.e. day, month, year
         private String monthAbr, date;
         private int month, day, year;
       // ... define the default constructor (initializes the instance variables to zero)
         public Date(){
              this.date = "";
              month = 00;
              day = 00;
              year = 0000;
       // ... define the method toString
       //     This method should return the corresponding Date string in the following format: Nov, 11, 2006
         public String toString() {
               return (monthAbr + ", " + day + ", " + year);
       // ... define the methods specified by the interface InOutputable
    public boolean equals(InOutputable other) {
         Date otherDate = (Date) other;
         if (month == otherDate.month && day == otherDate.day && year == otherDate.year)
              return true;
         else
              return false;
    public void input(BufferedReader in) throws IOException {
         date = in.readLine();
         if (date == null)
              return;
         month = Integer.parseInt(date.substring(0, 2));
         day = Integer.parseInt(date.substring(3, 5));
         year = Integer.parseInt(date.substring(6, 10));
    public boolean isNull() {
         if (month == 0 && day == 0 && year == 0)
              return true;
         else
              return false;
    public void output(PrintStream writer) {
         writer.println(toString());
       // ... define the method specified by the interface Comparable
    public int compareTo(Object o) {
         Date otherDate = (Date) o;
         if(month == otherDate.month && day == otherDate.day && year == otherDate.year)
              return 0;
         else if (month >= otherDate.month && day >= otherDate.day && year >= otherDate.year)
              return 1;
         else
              return -1;
    public class PriorityQueue implements PriorityQueueInterface {   
       private RefSortedList lst = new RefSortedList();
       // ... define the methods specified by the interface PriorityQueueInterface
    public Comparable dequeue() throws EmptyQueue {
         return null;
    public void enqueue(Comparable key) throws FullQueue {
    public boolean isEmpty() {
         return false;
       // ... Use the lst object (by invoking list specific methods on it) when
       //     defining the PriorityQueueInterface methods.
       //     For example, method enqueue should be implemented by invoking list method add.
    public void add(Date date){
         lst.add(date);
    public void remove(Date date){
         lst.remove(date);
    }My output:
    Exception in thread "main" java.lang.NullPointerException
         at DateDriver.main(DateDriver.java:27)
    null, 4, 2004
    null, 2, 1998
    null, 0, 0
    The dates in descending order are:
    Can anybody please point me in the right direction? I know I am missing something, but I am unable to pinpoint it. I don't understand why the date.output(System.out) is throwing a null pointer exception. I am still working, but I thought maybe a fresh pair of eyes would help me.

    Dates implement Comparable... no need to sort them yourself
    SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
    LinkedList<Date> dtes = new LinkedList<Date>();
    BufferedReader in = new BufferedReader (new FileReader("C:/dates.txt"));
    while (in.read()>0){
    dtes.add(sdf.parse(in.readLine()));
    }Edited by: wpp289 on Dec 11, 2008 1:27 PM

  • I am making a game and need help badly

    I am makeing a sprite game and I want to make a ticker for a
    special move. I don't quite know how to go about making this ticker
    let alone subtract from the ticker once I make it. any help. help
    would be greatly appreciated. thanks in advance.

    I took the advice given but there are many text fields and am
    unsure of which one to choose. I tried looking them up in my flash
    professional and it told me to update. I tried many times and it
    doesn't update. I was just wondering which would be the best text
    field in this situation.

  • Massive iDVD project-Need help breaking it up

    I have been working on a comprehensive DVD of all of my family photos dating back to 1890. I have chapters split up by decades and then submenus within divided up by years. It is almost 2000 photos (no iMovies). Each year is its own slideshow with music attached (slideshow created within iDVD). The monster is 16gigs and over 800 minutes long (according to the project info), however, if you just add up each slideshow it only adds up to about 4 hours of material. I have a red "X" in the top box of my map view that says "total menu duration exceeds 15 minutes", however when I duplicate the project and start deleting chapters it never goes away.
    Is there away to easily split this project up into 2 or 3 DVD's?
    Or perhaps make the menus smaller?
    No one slide show is more than 13 minutes long.
    I am open to suggestions on how to tame this bohemoth.
    Thanks!

    As much as you would like it to be all on one DVD, clearly you need to break it up, unless you really want to burn it to a double layer DVD, which can accomodate 4 hours. This includes all the menus.
    I would break it up into two or three DVDs, by doing just what you tried; duplicate the DVD project and then delete the parts you don't want in the duplicates,so that you end up with 2 or 3 DVDs of 2hrs or 1 1/2hrs each. Since you already have them organized into years, it should be simple enough to do.

  • Class final project need help

    I have this final project due Monday for my java class. I'm having some trouble with this zoom slider which gives me 2 errors about "cannot find symbol". I've tried just about eveything i can think of and i cant come up with the solution... Here is my code:
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    import javax.swing.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.io.*;
    public class MenuExp extends JFrame implements MouseMotionListener,MouseListener,ActionListener
    /* creates the file menus and submenus */
         JMenu fileMenu = new JMenu("File");
        JMenu plotMenu = new JMenu("Plotting");
        JMenu helpMenu = new JMenu("Help");
        JMenuItem loadAction = new JMenuItem("Load");
        JMenuItem saveAction = new JMenuItem("Save");
        JMenuItem quitAction = new JMenuItem("Quit");
        JMenuItem colorAction = new JMenuItem("Segment Colors");
        JMenuItem helpAction = new JMenuItem("Instructions");
        JButton button;
         Cursor previousCursor = new Cursor(Cursor.DEFAULT_CURSOR);
        JLabel cLabel;
        JPanel cPanel;
        private String filename = null;  // set by "Open" or "Save As"
        double scale = 1.0;
        public MenuExp(File f)
            setTitle("PlotVac");
            Container pane = getContentPane();
            ImageIcon chartImage = new ImageIcon(f.getName());
              ChartDisplay chartLabel = new ChartDisplay(chartImage);
              JScrollPane scpane = new JScrollPane(chartLabel);
              pane.add(scpane, BorderLayout.CENTER);
              chartLabel.addMouseListener(this);  //change cursor
              chartLabel.addMouseMotionListener(this); //handle mouse movement
              JPanel cPanel = new JPanel();
              cLabel= new JLabel("cursor outside chart");
              cPanel.add(cLabel);
              pane.add(cPanel, BorderLayout.NORTH);
              button = new JButton("Clear Route");
            button.setAlignmentX(Component.LEFT_ALIGNMENT);
            button.setFont(new Font("serif", Font.PLAIN, 14));
              cPanel.add(button);
              getContentPane().add(getSlider(), "Last");
    /* Creates a menubar for a JFrame */
            JMenuBar menuBar = new JMenuBar();
    /* Add the menubar to the frame */
            setJMenuBar(menuBar);
    /* Define and add three drop down menu to the menubar */
            menuBar.add(fileMenu);
            menuBar.add(plotMenu);
            menuBar.add(helpMenu);
    /* Create and add simple menu item to the drop down menu */
            fileMenu.add(loadAction);
            fileMenu.add(saveAction);
            fileMenu.addSeparator();
            fileMenu.add(quitAction);
            plotMenu.add(colorAction);
            helpMenu.add(helpAction);
             loadAction.addActionListener(this);
             saveAction.addActionListener(this);
             quitAction.addActionListener(this);
        private JSlider getSlider()
            JSlider slider = new JSlider(25, 200, 100);
            slider.setMinorTickSpacing(5);
            slider.setMajorTickSpacing(25);
            slider.setPaintTicks(true);
            slider.setPaintLabels(true);
            slider.addChangeListener(new ChangeListener()
                public void stateChanged(ChangeEvent e)
                     int value = ((JSlider)e.getSource()).getValue();
                     cPanel.zoom(value/100.0);
            return slider;
        private void zoom(double scale)
            this.scale = scale;
            cPanel.setToScale(scale, scale);
            repaint();
    /* Handle menu events. */
           public void actionPerformed(ActionEvent e)
              if (e.getSource() == loadAction)
                   loadFile();
             else if (e.getSource() == saveAction)
                    saveFile(filename);
             else if (e.getSource() == quitAction)
                   System.exit(0);
    /** Prompt user to enter filename and load file.  Allow user to cancel. */
    /* If file is not found, pop up an error and leave screen contents
    /* and filename unchanged. */
           private void loadFile()
             JFileChooser fc = new JFileChooser();
             String name = null;
             if (fc.showOpenDialog(null) != JFileChooser.CANCEL_OPTION)
                    name = fc.getSelectedFile().getAbsolutePath();
             else
                    return;  // user cancelled
             try
                    Scanner in = new Scanner(new File(name));  // might fail
                    filename = name;
                    while (in.hasNext())
                    in.close();
             catch (FileNotFoundException e)
                    JOptionPane.showMessageDialog(null, "File not found: " + name,
                     "Error", JOptionPane.ERROR_MESSAGE);
    /* Save named file.  If name is null, prompt user and assign to filename.
    /* Allow user to cancel, leaving filename null.  Tell user if save is
    /* successful. */
           private void saveFile(String name)
             if (name == null)
                    JFileChooser fc = new JFileChooser();
                    if (fc.showSaveDialog(null) != JFileChooser.CANCEL_OPTION)
                      name = fc.getSelectedFile().getAbsolutePath();
             if (name != null)
                  try
                      Formatter out = new Formatter(new File(name));  // might fail
                        filename = name;
                      out.close();
                      JOptionPane.showMessageDialog(null, "Saved to " + filename,
                        "Save File", JOptionPane.PLAIN_MESSAGE);
                    catch (FileNotFoundException e)
                      JOptionPane.showMessageDialog(null, "Cannot write to file: " + name,
                       "Error", JOptionPane.ERROR_MESSAGE);
    /* implement MouseMotionListener methods */     
         public void mouseDragged(MouseEvent arg0)
         public void mouseMoved(MouseEvent arg0)
              int x = arg0.getX();
              int y = arg0.getY();
              cLabel.setText("X pixel coordiate: " + x + "     Y pixel coordinate: " + y);
    /*      implement MouseListener methods */
         public void mouseClicked(MouseEvent arg0)
         public void mouseEntered(MouseEvent arg0)
             previousCursor = getCursor();
             setCursor(new Cursor (Cursor.CROSSHAIR_CURSOR) );
         public void mouseExited(MouseEvent arg0)
             setCursor(previousCursor);
             cLabel.setText("cursor outside chart");
         public void mousePressed(MouseEvent arg0)
         public void mouseReleased(MouseEvent arg0)
    /* main method to execute demo */          
        public static void main(String[] args)
             File chart = new File("teritory-map.gif");
            MenuExp me = new MenuExp(chart);
            me.setSize(1000,1000);
            me.setLocationRelativeTo(null);
            me.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            me.setVisible(true);
    }and this is the other part:
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.BasicStroke;
    import java.awt.Color;
    import java.awt.geom.Line2D;
    import javax.swing.Icon;
    import javax.swing.JLabel;
    public class ChartDisplay extends JLabel
    /* line at 45 degrees from horizontal */
         private int x1=884, y1=290, x2=1084, y2=490;
    /* horizontal line - x3 same as x2 */
         private int x3=1084, y3=490, x4=1384, y4=490;
         public ChartDisplay(Icon arg0)
              super(arg0);
    /* This overrides inherited method to draw on image */
         protected void paintComponent(Graphics arg0)
              super.paintComponent(arg0);
    /* Utility method to draw a "dot" at line ends */
         private void drawDot(Graphics g, Color c, int xDot, int yDot, int sizeDot)
              Color previousColor = g.getColor();
              g.setColor(c);
                g.fillOval(xDot-(sizeDot/2), yDot-(sizeDot/2), sizeDot, sizeDot);
                g.setColor(previousColor);   
    /* Utility method to draw a wider line */
         private void drawLine(Graphics g, Color c, int lineWidth, int xStart, int yStart, int xEnd, int yEnd)
              Color previousColor = g.getColor(); // save previous color
              Graphics2D g2 = (Graphics2D) g;  // access 2D properties
                g2.setPaint(c);  // use color provided as parameter
             g2.setStroke(new BasicStroke(lineWidth)); // line width
             g.setColor(previousColor);    // restore previous color
    }I've basically used the structure of other programs and incorporated them into my design. If anyone knows how i can fix the errors please let me know. The errors are found in line 91 and 100 which is where the zoom slider is occuring.
    **NOTE** the program isnt fully functional in the sense that there are buttons and tabs etc.. that are missing action listeners and things like that.
    Thanks for the help
    Edited by: gonzale3 on Apr 17, 2008 6:55 PM

    gonzale3 wrote:
    The code was on the forums as the person who posted it was using it as an example in a program he used... i didnt borrow the entire code im just using the way he did the zoom method and added it into my program. I wasnt aware that it was used in the JPanel class. C'mon, it's your program. If you don't know what you are doing in this program, then you shouldn't be using it.
    That is why im asking if someone can show me the right way to implement a zoom slider into my program or maybe give me an example where its used.What the fuck is a zoom slider???
    Edited by: Encephalopathic on Apr 17, 2008 8:00 PM

  • Final year project need help

    hi there
    i am doing an applet for my final year project. at the end of this project i have to end up with a simple uml drawing applet. i have done some coding but am way outa my league and now i am stuck. i have managed to draw lines and rectangles but have no idea how to make the lines attch to the rectangles or how to move a rectangle around the screenonce it has been drawn. my email address is [email protected] if you mail me i can give you my program and maybe you can help me

    You are right V.V, this applet is not finished yet, try this one,
    press the oval/rectangle/desic buttons and add shapes by clicking on an empty square, after adding some shapes press the line button, by clicking on 2 shapes you will add a line to connect them. you can drag the shapes and the lines will follow.
    Use double click for text. Drag the shape out of the screen and it will be deleted.
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    public class Flow extends Applet
         Button lineB = new Button("Line");
         Button rectB = new Button("Rect");
         Button ovalB = new Button("Oval");
         Button desiB = new Button("Desic");
         Button clirB = new Button("Clear");
         Label  typeL = new Label("             ");
         Dcanvas  canvas     = new Dcanvas();
    public void init()
         setLayout(new BorderLayout());
         add("Center",canvas);
         addButtons();
         resize(730,440);
    private void addButtons()
         lineB.addActionListener(new ButtonHandler());
         rectB.addActionListener(new ButtonHandler());
         ovalB.addActionListener(new ButtonHandler());
         desiB.addActionListener(new ButtonHandler());
         clirB.addActionListener(new ButtonHandler());
         Panel panel = new Panel();
         panel.add(lineB);
         panel.add(rectB);
         panel.add(ovalB);
         panel.add(desiB);
         panel.add(clirB);
         panel.add(typeL);
         add("North",panel);
    class ButtonHandler implements ActionListener
    public void actionPerformed(ActionEvent ev)
         String s = ev.getActionCommand();
         if(s.equals("Clear")) canvas.clear();
         if(s.equals("Line"))  canvas.setType(1);
         if(s.equals("Rect"))  canvas.setType(2);
         if(s.equals("Oval"))  canvas.setType(3);
         if(s.equals("Desic")) canvas.setType(4);
    public class Dcanvas extends Panel
         Vector    objects = new Vector();
         Vector    lines   = new Vector();
         TextField txt     = new TextField("");
         Mobject   rc,rl,rd;
         Mline     ln;
         boolean   rcd  = false;
         boolean   rcl  = false;
         boolean   rct  = false;
         Rectangle rp;
         Graphics2D G;
         int sx,sy,oi;
         int objectType = 0;     
         int maxV = 8;
         int maxH = 9;
         int sizeW = 80;
         int sizeH = 50;
    public Dcanvas()
         super();
         setLayout(null);
         addMouseListener(new MouseHandler());
         addMouseMotionListener(new MouseMotionHandler());
         setFont(new Font("",0,9));
         txt.setSize(114,23);
         txt.setFont(new Font("",0,15));
         txt.setBackground(new Color(192,220,192));
         add(txt);
         txt.setVisible(false);
         txt.addTextListener(new TextListener()     
         {     public void textValueChanged(TextEvent e)
                   rc.setText(txt.getText());     
                   repaint(rc.x,rc.y,rc.width,rc.height);
    public void clear()
         objects.removeAllElements();
         lines.removeAllElements();
         objectType = 0;
         typeL.setBackground(Color.white);
         typeL.setText("");
         txt.setVisible(false);
         repaint();
    public void setType(int i)
         if (rcl) repaint(rl.x,rl.y,rl.width+1,rl.height+1);
         objectType = i;
         typeL.setBackground(Color.pink);
         if (i == 1)     typeL.setText(" Lines");
         if (i == 2)     typeL.setText(" Rects");
         if (i == 3)     typeL.setText(" Ovals");
         if (i == 4)     typeL.setText(" Desic");
         rcl = false;
    public void dragIt(int X, int Y)
         repaint(rc.x,rc.y,rc.width,rc.height);
         rc.x = rc.x + X - sx;
         rc.y = rc.y + Y - sy;
         rc.setPaintArea();
         sx   = X;
         sy   = Y;
         repaint(rc.x,rc.y,rc.width,rc.height);
    public void moveIt(int X, int Y)
         rcd = false;
         repaint(rc.x,rc.y,rc.width,rc.height);
         rc.x = X;
         rc.y = Y;
         rc.setPaintArea();
         repaint(rc.x,rc.y,rc.width,rc.height);
         Mline ml;
         for (int i=0; i < lines.size(); i++)
              ml = (Mline)lines.get(i);
              if (ml.from == rd || ml.to == rd)
                   ml.setPaintArea();
                   repaint();
    public void deleteIt()
         rcd = false;
         Mline ml;
         for (int i=0; i < lines.size(); i++)
              ml = (Mline)lines.get(i);
              if (ml.from == rd || ml.to == rd)
                   lines.remove(i);
                   i--;
         objects.remove(rc);
         repaint();
    public void paint(Graphics g)
         rp = g.getClipBounds();
         g.setColor(Color.white);
         g.fillRect(rp.x,rp.y,rp.width,rp.height);
         g.setColor(new Color(240,240,240));
         for (int x=0; x < 721; x=x+sizeW) g.drawLine(x,0,x,400);
         for (int y=0; y < 401; y=y+sizeH) g.drawLine(0,y,720,y);
         for (int i=0; i < lines.size(); i++) ((Mline)lines.get(i)).paint(g);
         for (int i=0; i < objects.size(); i++) ((Mobject)objects.get(i)).paintW(g);
         if (rcd) rc.paintD(g);
         if (rcl) rc.paintL(g);
    public void update(Graphics g)
         paint(g);
    //     *********   mouse   ************
    class MouseHandler extends MouseAdapter
    public void mousePressed(MouseEvent e)
         txt.setVisible(false);
         for (int i=0; i < objects.size(); i++)
              if (((Rectangle)objects.get(i)).contains(e.getX(),e.getY()))
                   rc  = (Mobject)objects.get(i);
                   rd  = rc;
                   sx  = e.getX();
                   sy  = e.getY();
                   if (e. getClickCount() == 2)  
                        txt.setLocation(rc.x,rc.y+rc.height-1);
                        txt.setText(rc.getText());
                        txt.setVisible(true);
                        txt.requestFocus();
                   rcd = true;
         if (rcd && rcl)
              ln  = new Mline(rl,rc);
              lines.add(ln);
              rcd = false;
              rcl = false;
              rp.setBounds(rc);
              rp.add(rl);
              repaint(rp.x,rp.y,rp.width,rp.height);
         if (rcd && objectType == 1)
              rcd = false;
              rcl = true;
              rl  = rc;
              repaint(rc.x,rc.y,rc.width,rc.height);
    public void mouseReleased(MouseEvent e)
         int x = e.getX()/sizeW;
         int y = e.getY()/sizeH;
         x = x * sizeW + 1;
         y = y * sizeH + 1;
         if (rcd)
              if (x > maxH || y > maxV) deleteIt();
                   else                  moveIt(x,y);
              return;     
         if (objectType == 2 || objectType == 3 || objectType == 4)
              rc = new Mobject(objectType,x,y,sizeW-2,sizeH-2);
              objects.add(rc);
              repaint(rc.x,rc.y,rc.width,rc.height);
    class MouseMotionHandler extends MouseMotionAdapter
    public void mouseDragged(MouseEvent e)
         if (rcd) dragIt(e.getX(),e.getY());
    //     *********   mouse  end ************
    class Mobject extends Rectangle
         long    id;
         int     type;
         int     ax,ay,aw,ah;
         String  text = "";
         Polygon po   = new Polygon();
    public Mobject(int t, int x,int y,int w,int h)
         super(x,y,w,h);
         type = t;
         setPaintArea();
         type = t;
         id = System.currentTimeMillis();
    public void setText(String s)
         text = s;
    public String getText()
         return(text);
    public void setPaintArea()
         ax = x + 5;
         ay = y + 5;
         aw = width  - 10;
         ah = height - 10;
         if (type == 4)
              po.npoints = 0;
              po.addPoint(ax+aw/2,ay);
              po.addPoint(ax+aw,ay+ah/2);
              po.addPoint(ax+aw/2,ay+ah);
              po.addPoint(ax,ay+ah/2);
              po.addPoint(ax+aw/2,ay);
    public void paintL(Graphics g)
         g.setColor(Color.orange);
         paint(g);
    public void paintD(Graphics g)
         g.setColor(Color.red);
         paint(g);
    public void paintW(Graphics g)
         g.setColor(Color.white);
         paint(g);
    public void paint(Graphics g)
         if (type == 2) g.fillRect(ax,ay,aw,ah);
         if (type == 3) g.fillOval(ax,ay,aw,ah);
         if (type == 4) g.fillPolygon(po);
         g.setColor(Color.black);
         if (type == 2) g.drawRect(ax,ay,aw,ah);
         if (type == 3) g.drawOval(ax,ay,aw,ah);
         if (type == 4) g.drawPolygon(po);
         g.drawString(text,ax+3,ay+ah/2+2);
    class Mline
         Mobject from,to;
         int x1,y1,x2,y2;
    public Mline(Mobject f, Mobject t)
         from = f;
         to   = t;
         setPaintArea();
    public void setPaintArea()
         x1 = from.x + from.width/2;
         y1 = from.y + from.height/2;
         x2 = to.x + to.width/2;
         y2 = to.y + to.height/2;
    public void paint(Graphics g)
         g.setColor(Color.blue);
         g.drawLine(x1,y1,x2,y2);
    Noah

  • Small Flash game, really need help please?

    I'm making a small Flash game, which is rotating rings in an image to create a coherent picture. Think of the puzzles in Assassins Creed.
    I have three scenes set up, one with the puzzle, one with a fade to white transition, and one with a congratulatory screen.
    I have this code to check if the orientation of the rings match, but I'm really new to actionscript so I'm not sure if it's right or not.
    function orientationCheck()
    if (center.orientation == 0 && ring1.orientation == 0 && ring2.orientation == 0 && ring3.orientation == 0 && ring4.orientation == 0)
    gotoAndPlay(1,"Scene2");
    else
    stop();
    Unfortunately it keeps playing through the movie and not giving the player time to solve the puzzle.
    I have CS5.5 if that makes any difference, please help, heck I can send you the file so you can see exactly what's going on, just let me know.

    the trace() function is, by far, the most important tool in flash for code debugging.  nothing else even comes close:
    function orientationCheck()
    trace(center.orientation,ring1.orientation,ring2.orientation,ring3.orientation,ring3.orien tation);
    if (center.orientation == 0 && ring1.orientation == 0 && ring2.orientation == 0 && ring3.orientation == 0 && ring4.orientation == 0)
    gotoAndPlay(1,"Scene2");
    else
    stop();
    Unfortunately it keeps playing through the movie and not giving the player time to solve the puzzle.
    I have CS5.5 if that makes any difference, please help, heck I can send you the file so you can see exactly what's going on, just let me know.

  • My mlb at bat app blacks out the wrong games, I need help please.

    My mlb at bat app blacks out atl braves games no matter where they are playing, but doesn't black out the teams in my area. Anyone have any suggestions, it only does that when I'm connected to att network. When I'm on wifi I get braves games and the local games get blacked out like they are suppose too. I've contacted MLB and they say their end is good. Thanks!

    Perhaps this will help:
    http://mlb.mlb.com/mobile/atbat_blackouts.jsp
    Regards.

  • New to SAP FICO - Placed in a support project - Need Help

    Hi everyone,
    I have placed for a support project in a retail industry and I have been taken FICO as my module. Can you guys help me in knowing what all things I have to do in the initial stage
    Regards,
    Prajeesh
    SAP FICO Consultant
    Moderator: Please, read and respect SDN rules

    They are in the same path in the jar file that they were when they were on your disk in the file system. Lets say you have a dir structure
    C:\dir1\dir2\dir3\dir4\file.txt
    and you cd to dir2:
    cd \dir1\dir2
    then you jar dir3:
    jar cvf jar.jar dir3/*.*
    the path to file.txt would still be /dir3/dir4/file.txt inside the jar file.
    do a jar tvf jarfile.jar and take a look.

Maybe you are looking for

  • IPhone acting wierd after 1.1.3 update.

    After the new software update, my iPhone screen stops responding randomly. It only happens while I'm on safari and the iPod. It only happens rarely on the iPod, but when on safari, it happens enough to be a nuisance. Is this a problem other people ar

  • Accessing active directory with javascript client object model

    Hello All, my requirement is to get user profile "picture" from active directory of my org. to my sharepoint 2013 intranet site via java script client object model programming. I am successful in retrieving user details (including pics) from user pro

  • VF03 Profitability Analysis - Cost not capture in profitability

    HI SAPFans, I'm facing difficulty on profitability analysis on VF03. The problem is, my cost of sales is not capture on Value fields tab (refer attachment). [vf03|[IMG]http://i303.photobucket.com/albums/nn133/kerisnagasostro/vf03.jpg[/IMG]] is there

  • Job Log File

    Hello, I am a beginning in SAP, how to find the cause of an error in the job, is there some job log file? Thanks.

  • How to stop extended buffering/loading?

    Hello! I have a high speed internet and when i watch video on SMP the video lags, because video is being loaded very fast (thats what i've noticed on every other player, includng youtube), so my question is whether it's possible to allow to load only