Tetris game problem

I'm using AS2 and fps120.
I'm creating a tetris game, but I encountered a problem:
I made a function which makes the block go directly to the bottom on the press of "space".
I used
if(Key.isDown(Key.SPACE)){
But when I pressed space, the blocks stacked up immediately. It's because after I press space, another block apears immediately and goes to the bottom immediately, and keeps going until I release spade. It isn't a problem if I use lower fps, but my fps is 120, which means even I release space as quickly as I could, at least six blocks would stack up. I want to know is there anyway to detect the releasing of "space" or a detection which only detects on the instant I press, instead of when the key is down.

use a boolean:
if(Key.isDown(..)){
if(!alreadyExecuted){
alreadyExecuted=true
if(Key.isUp(..)){
alreadyExecuted=false;

Similar Messages

  • Need some help with the starters of an Xlet tetris game!

    Hello everyone, I'm a new employer at the company Emedig, a small company based in Sweden (sort of a sister-company/child-company to Emedise) and I've recently started programming with Java to make Xlets and such.
    Basically, I'm sort of new in the area, and have decided to try and make a simple Tetris game to develop my skills and knowledge, but I've run into a bit of a problem:
    The Problem< I'm not sure exactly HOW I am going to create a simple square (a block) in my Xlet and then make it moveable around the screen with Xletviews (Using that emulator for your information) remote control. I am not sure exactly what command to use to create the Block (how I'm suppose to draw it) neither how to make it move around via the keys.ANY help is VERY much appreciated, and thanks for your read!

    Hi Libchh,
    I am newly joined to the forum, and I am going throgh the JAVA TV, MHP and xlet. I wanted to know how to write Tatris program and run in Xletview? If you have any materials regarding the program please do send me.
    Thanks alot.
    Any help is very much appreciated.

  • Titanium Fatal1ty Pro SPDIF game problem

    (Titanium Fatalty Pro SPDIF game problem hi all,
    sorry if this issue reported in the past i but i could not get any answer on any relati've posts, the terminology was so complicated
    i buy?a new pc with a Titanium Fatalty Pro sound card, i use Vista sp2 x64, the sound card is connected to my external amplifier with SPDIF out in order to get surround sound for my movies and my games and here is my problem
    any movies format with surround sound play perfect with out any problem any kind of movie DVD, dvix, mkv?files?etc
    but non of the games i play?use the surround system, why is that? is any?kind of special settings needed to be done? how is possible to get surround to movies and not to the games?
    thanks you all for your time ?

    ,Re: Titanium Fatalty Pro SPDIF game problem? this is really coincidence - I just posted on the very same topic 5 minutes ago.
    for games just go to the Console Entertainment mode > Encoder > Dolby Digital. Although this is not documented I believe what happens is that the sound card encodes the 6 digital channels onto Dolby Digital mode and transfers this over SPDIF. Kok-Choy actually recommend using the standard analogue cables (and he has a point as you are actually upcoding an existing game signal onto Dolby so that your digital receiver can then decode this down to 6 channels - seems a pretty useless overhead)
    for video - I am curious to know what you do - I can either get 96/24 bits on the display of my z5500 with a direct signal but the z5500 receiver then tells me that this signal is only in dolby ProLogic II (and not DD or DTS). As alternati've I use again the encoder and have to select for EACH FILM WHAT IS BEST DOLBY DIGITAL OR DTS. Pls explain what settings you use.
    thanks

  • Sound blaster Audigy 2 zs gamer problem!

    (Sound blaster Audigy 2 zs gamer problem!? I had a recent problem recently that caused Windows not to load at all. After getting that fixed and the computer back home I have run into a sound issue. None of the Creative's Media Source programs would work properlly. When clicked on I would get the error that the program has encountered an error and needs to close. Finally un-installed all creative programs and related software and went through the re-install process. Encountered an error that program could not load because plxcore.plx cannot be found. I went through the solution listed on?Creative's web site to fix the?issue and none of fixes worked. Recently deleted everything Creative again by uninstalling all drivers and going through the installshield folder and deletd all creative related items. Went through the install process again. Had the plx error, fixed it and had sound but had the same problems with the Media SOurce as before. Went to Creative's web site through auto updater for a new driver and other essential items needed for my sound. Back to no sound again. Under Windows control panel under sounds and audio devices under volume tab, it will not even let me select the speaker setting or place the volume control on the task bar. @99.3.9.75

    Brettpopp
    Try updating your BIOS to the latest and have the sound card tested on another machine to see if it is still functioning.
    Jason

  • IPod Touch playng games problems , after download not start games

    iPod Touch playng games problems , after download not start games

    When touch the game icon just "blink" (tremor)for one momentend not start games, a lot of games,aleator ,never apps sistem to the factory.After restore to the factory seting and redownload is posible to run once or twice corectly and after that the trouble begin again.

  • 5G 60Gb Game Problem

    Hi just purchased 3games tetris, poker and pacman, updated my ipod to version 1.2, figured out the authorisation issues, but now when I try to play the games on my ipod I get the game splash screen then an error screen saying "this game cannot be played connect your ipod to itunes and reinstall the game".
    I have done this now several times, restored the ipod, reinstalled itunes7, rebooted ipod and computer, and still no luck. Anybody else have this problem, or a fix?
    Thanks in advance.
    a

    Problem solved see this thread http://discussions.apple.com/thread.jspa?messageID=3126257#3126257

  • Puzzle Game and new Game Problem

    Hello Java Programmers,
    Once again I have encountered a problem with my ongoing puzzle game. I have completed it all. Now I want my user to be able to start a new game in after they win. I tried repaint and update method with JFrame but it deosn't reshuffle the buttons. How can I do that. The code geos below.
    [/b]
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import javax.swing.JOptionPane;
    public class PuzzleGame{
       String[] btn_Labels = {"1","2","3","4","5","6","7","8","9",
                            "10","11","12","13","14","15"," "};
       String[] labels = {"1","2","3","4","5","6","7","8","9",
                            "10","11","12","13","14","15"};
       private final int ONE = 1, TWO = 2, THREE = 3, FIVE = 5;
       private boolean WIN_STATE = false; 
       private JButton b[];
       public String clicked_btn_label = "";
       //Constructor method.
       public PuzzleGame(){
          showSplashScreen();
          initGame();
       public static void main(String args[]){
          PuzzleGame game = new PuzzleGame();
       //When a new Game started labels of buttons are shuffled using this method.
       public void shuffleNumbers(){
          String temp = null;   
          for(int j=0; j<16; j++){
          int k = (int)(Math.random()*16);
          temp = btn_Labels[j];
          btn_Labels[j] = btn_Labels[k];
          btn_Labels[k] = temp;           
       //Game initialization method.
       public void initGame(){
          b = new JButton[16];
          JPanel p = new JPanel();
          JFrame frame = new JFrame();
          shuffleNumbers();
          for(int i=0; i<16; i++){
             b[i] = new JButton();
             b.setText(btn_Labels[i]);
    b[i].setActionCommand(""+(i+1));
    for(int i=0; i<16; i++){
    b[i].addActionListener( new ActionListener(){
    public void actionPerformed(ActionEvent e){
    clicked_btn_label =(String)e.getActionCommand();
    doSwapping();
    checkWin();
    p.add(b[i]);
    p.setLayout(new GridLayout(4,4));
    frame.getContentPane().add(p);
    frame.addWindowListener(new WindowAdapter(){
    public void windowClosing(WindowEvent e){
    System.exit(0);
    Dimension dm = Toolkit.getDefaultToolkit().getScreenSize();
    int x = (dm.width - 230)/2;
    int y = (dm.height - 240)/2;
    frame.setBounds(x,y,320,240);
    frame.setSize(340,240);
    frame.setVisible(true);
    //This method swaps the clicked button with the empty button if it doesn't violate rule.
    public void doSwapping(){
    int num = Integer.parseInt(clicked_btn_label);
    String temp;
    if( (num + ONE <= 16) && b[num].getText() == " " && num % 4 != 0){
    temp = b[num].getText();
    b[num].setText(b[num-ONE].getText());
    b[num-ONE].setText(temp);
    else if((num - TWO >= 0) && b[num-TWO].getText() == " " && ((num - ONE) % 4 != 0)){
    temp = b[num-ONE].getText();
    b[num-ONE].setText(b[num-TWO].getText());
    b[num-TWO].setText(temp);
    else if( (num + THREE < 16) && b[num+THREE].getText() == " "){
    temp = b[num-ONE].getText();
    b[num-ONE].setText(b[num+THREE].getText());
    b[num+THREE].setText(temp);
    else if( (num - FIVE >= 0) && b[num-FIVE].getText() == " "){
    temp = b[num-ONE].getText();
    b[num-ONE].setText(b[num-FIVE].getText());
    b[num-FIVE].setText(temp);
    // else{}
    public void checkWin(){
    WIN_STATE = true;
    for(int i=0; i<15; i++){
    if( b[i].getText() != labels[i])
    WIN_STATE = false;
    if(WIN_STATE == true){
    JOptionPane.showMessageDialog(null,"Congratulations You Have won the Game!","You Win",JOptionPane.INFORMATION_MESSAGE);
         initGame();
    public void showSplashScreen(){
    JWindow w = new JWindow();
    JPanel p = (JPanel)w.getContentPane();
    JLabel l = new JLabel(new ImageIcon("splash.jpg"));
    Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
    int x = (d.width - 230)/2;
    int y = (d.height - 240)/2;
    p.add(l);
    w.setBounds(x,y,320,240);
    w.setVisible(true);
    try{
    Thread.sleep(10000);
    catch(Exception e){
    w.setVisible(false);
    [/b]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Sorry for violation. I would like to add a menubar to the application containing a single menu button for new game. adding a menubar is simple but how can i reshuffle the buttons using methods like update etc. or any other way.

  • Flash games problem with Mozilla Firefox

    Ok so, I'm trying to play one great flash game, I'm actually Texas hold'em addict :D so, as soon as I open it, firefox just crashes and that's it, nothing appears, no crash report or anything like that..
    I'm trying to play this game: [http://www.4yahoo.com/board-card/play-governor-of-poker-2 Governor of Poker 2] and this one [http://www.4yahoo.com/puzzle/play-the-forest-temple The Forest Temple]
    What to do? Should I reinstall it or it could be my windows problem?
    I don't really want to re-install it, because I have tons of bookmars there and got no idea how to save them, also I'm afraid that it will be waste of time.
    So I'm asking you guys, maybe someone faced this problem.
    Thanks in advance.

    I mean, it's ok when I run other games, but those two are the problem :(

  • Please help me with a simple flash game problem

    I am trying to learn how to make flash games with Adobe flash 5.5. I am doing a tutorial from a book and am stuck.
    The game is called concentration and you are suppose to match 2 tiles of the same shape. there are 10 shape tiles
    and 1 question mark tile. These tiles are held in an array. 20 tiles are suppose to be displayed 5 to a row with 4 rows
    and the question mark is suppose to be up on all 20. My problem is I get a blank screen when I test the movie. I
    think the code is good but I beleive I have not uploaded the tiles right. I did upload the 11 tiles to the library and have
    those 11 tiles and tile_movieclip in the library. Here is the code:
    package {
    // importing classes
    import flash.display.Sprite;
    // end of importing classes
    public class Main extends Sprite {
    public function Main() {
    // variables and constants
    const NUMBER_OF_TILES:uint=20;
    const TILES_PER_ROW:uint=5;
    var tiles:Array=new Array();
    var tile:tile_movieclip;
    // end of variables and constants
    // tiles creation loop
    for (var i:uint=0; i<NUMBER_OF_TILES; i++) {
    tiles.push(Math.floor(i/2));
    trace("My tiles: "+tiles);
    // end of tiles creation loop
    // shuffling loop
    var swap,tmp:uint;
    for (i=NUMBER_OF_TILES-1; i>0; i--) {
    swap=Math.floor(Math.random()*i);
    tmp=tiles[i];
    tiles[i]=tiles[swap];
    tiles[swap]=tmp;
    trace("My shuffled tiles: "+tiles);
    // end of shuffling loop
    // tile placing loop
    for (i=0; i<NUMBER_OF_TILES; i++) {
    tile=new tile_movieclip();
    addChild(tile);
    tile.cardType=tiles[i];
    tile.x=5+(tile.width+5)*(i%TILES_PER_ROW);
    tile.y=5+(tile.height+5)*(Math.floor(i/TILES_PER_ROW));
    tile.gotoAndStop(NUMBER_OF_TILES/2+1);
    // end of tile placing loop
    Can someone please explain to me what I am suppose to do to make the this work? I beleive the problem is it doesnt know where the tiles are.
    Thanks.

    To create the tiles, draw 10 distinct shapes in the first 10 frames of your symbol, and
    the back of the tile in the 11th frame. You are free to draw them as you want, but I suggest you make them as 90 pixels squares with registration point (starting x and y position) at 0, because these are the properties of the tiles used in this chapter's
    examples. At least, they should all be the same size.
    It didnt say put in a library. It is saying to draw them in frames of symbol but it didnt walk me through that. Can you guide me through this? I also was looking at how to add the link identifier but it said I need a popup window but I cant see one. I thought that was done
    when I went to insert new symbol. It said something about actionscript linkage. I am familliar with perl, java and c++ so I can follow the code so far but I dont have much understanding of the flash interface. I made the 10 shape tiles and the 1 question mark tile
    in paint. They are .jpeg images.

  • 2 player web-based Flash game problem

    I have a two player web-based Flash game. The Flash calls a
    JavaScript function on the webpage to get and store the user's IP.
    Then an XML file with user's game data is loaded and parsed. The IP
    address is used to identify which player is player 1 and which is
    player 2 according to the XML file. There is a Java applet to send
    and receive messages between the players.
    The first player loads everything just fine. All the first
    player's messages regarding the progress in loading different parts
    of the code sent by the game for debugging are displayed in the
    Java applet's text box, but none of the second player's messages
    sent by the game for debugging are displayed.
    The problem is that the second player's ActionScript code
    appears not to be executing except that I do get a message in the
    game that the XML file attempted to load but was not successful.
    The IP address call is not made and no messages can be sent to the
    other player. The second player's Java applet displays only the
    messages for debugging that came from the first player's game and
    any chat messages sent by the first player.
    This problem always happens to the second player, never to
    the first player. Both player's are always using IE6 or IE7.
    Does anyone have some idea(s) what could cause only the
    second player's ActionScript code not to execute and/or not to load
    an XML file correctly?
    This is just a general question, so any general answers would
    be appreciated. Code specific answers are hopefully not required.
    Thank You in advance.

    Hi,
    I am not very familiar with the multiplayer Game development. For multiplayer games, you'll need to set up a matchmaking server and have the clients connect to it. It can then pair them off and facilitate communications. If the clients have publicly available
    network addresses then it can introduce them and they can talk directly to each other.There isn't anything built in for this so you'll need to either build your own or find a third party implementation. If you are using Unity3d then check out
    http://docs.unity3d.com/Documentation/Components/net-MasterServer.html
    Also, you can use Xbox services, and I find an article below:
    https://msdn.microsoft.com/en-us/library/bb975801.aspx
    For windows Azure problem, you should go to windows Azure forum.
    Best Wishes!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

  • Internet Explorer 9, 10 and 11 have games problems on Facebook.

    I Have been trying for 2 months to solve the problem with Internet Explorer 11 and games on Facebook. Each time I click on a game I get a login page which flashes on and off. The only way to stop it is to close Internet Explorer. I contacted Facebook and
    put a report in and I am still waiting after 2 months for a reply. I have since removed IE 11 and also IE 10 which makes it I am now using IE 9. I have reset IE 9 to no avail and I am now at a loss as to what the problem is. I am using Windows 7 on a pc.
    Can anybody help me please.

    [url=http://postimg.org/image/pg9rdcjsr/][img]http://s25.postimg.org/pg9rdcjsr/Facebook_page.jpg[/img][/url]
    I hope this helps as I have not done this before.
    Ermiad
    I've never seen a problem like this before. Check steps given below:-
    See: "How
    to Reset Internet Explorer settings".
    Then...
    1.
    Please download and run the Microsoft
    Safety Scanner tool (freeware).
    2.
    Reboot your PC.
    3.
    Please download and update Malwarebytes Anti-Malware
    Free
    4. Reboot
    Windows in Safe
    Mode and
    run a Full Scan with
    Malwarebytes Anti-Malware.
    If still no joy...
    5. Download
    and Run AdwCleaner, RogueKiller and Junkware
    Removal Tool (Freeware)
    6. Reboot and Test.
    Try the above steps and let us know the result!
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • 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.

  • Flash game problem: Game wont start until user clicks stage

    Hi Everyone,
    I'm a student at Drexel University and I just completed a basic platformer for a actionscript class. My professor docked me some points for the game not working until the user actually clicks within the swf. I've heard that this problem is caused on mac osx, but I don't have any concrete evidence to get the points back. Can anyone help? Here's a link to the game if you want to check it out. Thanks a lot!
    http://sandbox.westphal.drexel.edu/~kg394/DIGM265.html

    It was also required on my PC using IE8, so your Mac theory is out.  If it requires that you set focus on the stage to get it running, then you probably want to have focus set there using code as soon as the game section starts... but I usually have a heck of a time managing focus with actionscript... regardless of how they say to implement it, it tends to not work for me on any reliable basis (probably just Murphy's Law).

  • K9AGM4-L online games problem

    I have
    Athlon 64 2.7 GHZ (LE-1640) socket AM2 PROCESSOR
    MSI K9AGM4 AMDD690V/AM2DDR2 800/PCI-E/VS/S/RAID/LAN
    KINGSTON 1GB DDR2 PC667
    SEAGATE 160GB STA
    500W POWER SUPPLY
    it is very lag and it freezes on online games but it works fine with GTA, Warcraft and Counterstrike. I already did the live update but still no luck. Can anyone help me with this problem? I have a different motherboard k9ngm4 and it works smoothly.

    You can check the processor specs on this link.
    http://www.amd.com/us-en/Processors/ProductInformation/0,,30_118_9485_9487%5E10248,00.html
    My power supply is Seasonic M12 500W Power Supply
    http://www.techaddicts.net/reviews/sea_m12_500w/sea_m12_500w.html
    thanks for helping me find a solution for this problem...

  • Pong Game Problem

    I have a problem with my pong game. IT says its missing a return statement at :71: and at someplace else. How do I fix this? Below is the source code. Note that I haven't done puck-paddle collisions yet. It isn't supposed to do those right now anyway, so please try to fix the return statement problem, not that. Here is the code:
    import java.applet.*;
    import java.awt.*;
    public class Ponggame extends Applet implements Runnable
         int score = 0;
         int otherscore = 0;
         int y_speed = 0;
         int other_y_speed = 0;
         int appletsize_x = 640;
         int appletsize_y = 480;     
         int xpos = 620;
         int ypos = 220;
         int otherxpos = 20;
         int otherypos = 220;
         int ball_xpos = 130;
         int ball_ypos = 130;
         int radius = 20;
         int ball_xspeed = 2;
         int ball_yspeed = 2;
         int paddle_width = 32;
         int paddle_height = 80;
         int other_paddle_width = 32;
         int other_paddle_height = 32;
         //Variables for Double Buffering
         private Image dbImage;
         private Graphics dbg;
         public void init()
              setBackground (Color.black);
         public void start()
              Thread th = new Thread (this);
              th.start ();
         public void stop()
         public void destroy()
         public boolean keyDown (Event e, int key)
              if (key == Event.UP)
                   y_speed = -2;
              else if (key == Event.DOWN)
                   y_speed = 2;
              else if (key == 119)
                   other_y_speed = -2;
              else if (key == 115)
                   other_y_speed = 2;
         public boolean keyUp (Event e, int key)
              if (key == Event.UP)
                   y_speed = 0;
              else if (key == Event.DOWN)
                   y_speed = 0;
              if (key == 119)
                   other_y_speed = 0;
              else if (key == 115)
                   other_y_speed = 0;
         public void run()
              Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
              while (true)
                   if (ball_xpos > appletsize_x - radius)
                        otherscore += 1;
                        ball_xpos = 120;
                        ball_ypos = 120;
                   else if (ball_xpos < radius)
                        score += 1;
                        ball_xpos = 120;
                        ball_ypos = 120;     
                   else if (ball_ypos > appletsize_y - radius)
                        y_speed = -2;
                   else if (ball_ypos < radius)
                        ball_yspeed = +2;
                   else if (ypos<0)
                        ypos = 0;
                   else if (ypos+paddle_height>appletsize_y)
                        ypos = (appletsize_y - paddle_height);
                   else if (otherypos<0)
                        otherypos=0;
                   else if (otherypos+other_paddle_height>appletsize_y)
                        otherypos = (appletsize_y - other_paddle_height);
                   ypos += y_speed;
                   otherypos += other_y_speed;
                   ball_xpos += ball_xspeed;
                   ball_ypos += ball_yspeed;
                   // Neuzeichnen des Applets
                   repaint();
                   Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
         public void update (Graphics g)
              if (dbImage == null)
                   dbImage = createImage (this.getSize().width, this.getSize().height);
                   dbg = dbImage.getGraphics ();
              dbg.setColor (getBackground ());
              dbg.fillRect (0, 0, this.getSize().width, this.getSize().height);
              dbg.setColor (getForeground());
              paint (dbg);
              g.drawImage (dbImage, 0, 0, this);
         public void paint (Graphics g)
              g.setColor (Color.red);
              g.fillOval (ball_xpos - radius, ball_ypos - radius, 2 * radius, 2 * radius);
              g.setColor (Color.white);
              g.fillRect (xpos, ypos, paddle_width, paddle_height);
              g.fillRect (otherxpos, otherypos, other_paddle_width, other_paddle_height);
    }

    Your public boolean keyXXX methods don't return a boolean.
    And use code tags when posting code. There is a code button above the message editor.

Maybe you are looking for

  • My iphone 3gs is not showing in itunes despite restarting and reloading itunes,please help!

    I have re-loaded itunes but my phone is not showing. I have run diagnostics on it as well but the tests show that the ports cannot find the device. Any suggestions are gratefully received. Thanks.

  • To handle exception in insert query

    Hi , I am trying it insert certain records from another table A to temp table B, while doing insert i am having exception of unique constraint in table B how can i check which record is throwing exception while inserting in table A for eg: insert int

  • In BO v5.1.7 , Is there a way that we can find out the number of users

    BO Version : 5.1.7 Hi There, I am new to Business Objects and I am having a task to complete. I need to find out how many users are using the Business Objects in our older version. I understand in BOBJ XI there is a provision in CMC to execute a quer

  • LCD fading to black

    Hi all, My first post here wanted to ask if anyone has had the same issue I have a new Macbook Pro less than 1 month old it was fine for the first 3 weeks now I am noticing that to the left of my screen it is darker than my right? it's very strange s

  • How to track your order

    Up to four hours after placing your order, it will appear in our system. Track its progress: Mobile or SIM on a plan orders - Track delivery through the Telstra Online Order email we sent when you ordered, or visit www.startrack.com.au Select 'Enter