Unstoppable looping in Brick Breaker

Hi,
When playing Brickbreaker is is possible to get the ball looping in a corner between a brick and the walls. :-(
The ony way to stop that is leaving the app.
The question is how to detect and stop this loop in the code, or loops in general?.
Kind regards,
Tony Thijs
Edited by: TonyThijs on Feb 17, 2009 12:32 PM

Hi Howg,
You may want to try one of the following processes as listed here:
http://www.blackberry.com/btsc/KB03901
Make sure you select the box listed next to BrickBreaker for the installation.
Cheers,
-FB
Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
Be sure to click Kudos! for those who have helped you.
Click "Accept as a Solution" for posts that have solved your issue(s)!

Similar Messages

  • How to come out if loop other using break.

    can u plz give an example where i want come out of if loop other than break , return keyword.
    example If
    {  System.out.println("   ");
    break;
    or return;
    }

    Can you please give an example how to terminate a
    loop other than using break or return.What is the purpose of the question?
    Do you have a bug where it appears a loop is being terminated some other way?
    You need to clarify.

  • [svn:osmf:] 17980: Fix FM-1092: Calling stop when loop is true breaks looping.

    Revision: 17980
    Revision: 17980
    Author:   [email protected]
    Date:     2010-09-30 17:42:23 -0700 (Thu, 30 Sep 2010)
    Log Message:
    Fix FM-1092: Calling stop when loop is true breaks looping.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-1092
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/media/MediaPlayer.as

    Hi Experts,
    After i tried a few times, i can successfully start prepare with upgrade asistant monitor - Administrator >> Start Prepare,
    Thanks

  • 8120 Missing Brick Breaker after OS upgrade

    I recently did an Operating System upgrade on my Pearl 8120 and went to play brick breaker afterwards and noticed that the game was missing from my phone. It somehow managed to get deleted during the upgrade.
    Is there any way that I can it back?

    there is a check box your suppose to click. if its not clicked for the game, it wont upload it on the new software.
    i believe you have to reload it and make sure the box is checked.

  • Bricks breaking

    Hello,
    I am trying to make a tile based game. Bricks breaking. see image below and actionscript 3.0 outputs
    Here i removed a colored area with a floodfill algorithm.
    The tile above it ( alpha effect ) must shift down X pixels (tilesize). In some colums the tiles must shift down 1 tile, in others 2 or more....
    Has anyone a solution to this problem? The game is tile base and update its values with a multidimensional array.
    I can provide my AS3.0 script if required..

    >> you absolutely can have a tile-based game that uses bitmap methods where the tiles are represented in data
    Of course. I didn't mean to say you couldn't do it. I'm just not uderstanding where the problem lies - if the OP can draw the tile data to the screen, from the tile array, then there should be no trouble redrawing once some tiles have been removed... the fact that there is a problem just made me think that maybe going the bitmap route was overkill.

  • Coming out of loop

    DEAR TECHIS,,
    plz tell me the way to come out from the loop of item table
    i have devloped a bdc prog for Customer invoice fb70. for that i have used  two tables for header and item. here my problem is after posting the data. the loop is not breaking of item table to undersanding pupuse i m giving smalle
    as
    loop at header .
    performe...
            loop at item where acnt = header-acnt.
    perform........
           endloop.
    endloop.
    Here i didnt get the way to come out from the item tables loop.
    pls reply....
    Rewards for useful ans..
    thanks in advance...

    Hi Devalla,
    It's of sure that, your are looping the item table only when you have the acnt = header-acnt, in the Where condition of the loop.
    Stilll you find that your loop is not breaking up means its really a ?
    Try to debug and find out where is the probs?
    okay .. if you want to come out conditionally, place EXIT command at the begining or at the end of the Loop by placing a CHECK. with whatever you want either using the count of number of entries in the item table with respect to the header acnt field.
    if thing it's sure it's going to be some simple thing which block you...
    If still cant post the code.. with where it hooks...
    Reward points if useful

  • Want to know more details about control breaks in reports

    hello all
    i want to know more details about control breaks AT First,
                                                                          AT Last,
                                                                          AT New,
                                                                          At End of and on change .
    can anybody tell with examples?

    Hi Swamy,
       Check the following.
    Control break statements are used to create statement blocks which process only specific table lines the LOOP – ENDLOOP block.
    You open such a statement block with the control level statement AT and close it with the control level statement ENDAT. The syntax is as follows:
    Table should be sorted when you use control-break statements
    You can break the sequential access of internal tables by using these statements.
    Syntax:
    At first.
    <Statement block>
    Endat.
    This is the first statement to get executed inside the loop (remember control break statements are applicable only inside the loop)
    So in this block you can write or process those statements which you want to get executed when the loop starts.
    At New carrid.
    Write:/ carrid.
    Endat.
    In this case whenever the new carrid is reached, carrid will be written.
    At End of carrid.
    Uline.
    Endat.
    In this case whenever the end of carrid is reached, a line will be drawn.
    At Last.
    Write:/ ‘Last Record is reached’.
    Endat.
    Processing of statements within this block is done when entire processing of entire internal table is over. Usually used to display grand totals.
    You can use either all or one of the above control break statements with in the loop for processing internal table.
    At end of carrid.
    Sum.
    Endat.
    In above case the statement SUM (applicable only within AT-ENDAT) will sum up all the numeric fields in internal table and result is stored in same internal table variable.
    Hope this helps you.
    Any queries, get back to me.
    Regards,
    Chandra Sekhar

  • How do I return to the top of a while loop?

    I have a while loop running through a file. If some criteria in the line produces and error I'd like to return to the top of the loop and process the next line. I'd rather not nest everything in if's because it tends to make code 'downstream' very indented, messy, and hard to maintain.
    For example, in Perl I have the 'next' and 'last' statements which immediately return to the top of the loop and the end of the loop, respectively.

    The break statement in Java is similar to last in Perl.
    The continue statement in Java is similar to next in Perl.

  • ReadUTF() and exiting a server while loop

    What I want to do is simple.. I want to be able to type "exit" into a client and send that message to the server... And exit the server while loop as a result.. Here is what I tried.
    //server code
    while(true)
    //bla bla bla
    //bla bla bla
    String message = socket.readUTF();
    if( message == "exit" )
    break;
    // bla bla bla
    however, when I type exit and send the message, this while loop doesn't break.. I'm new to java so I'm wondering if I'm messing up syntax somewhere.. It seems like it should work fine, whats going on?

    if(message.equals("exit"))

  • While Loop Coding

    I have code where I am using a "while" statement. As long as the User presses the number 1 on the keyboard, the program loops back to the start, which is perfect, that is what I want. If a User press the number 0 on the keyboard, the program should stop and ... this is the part of the "while loop" that I don't understand how to code. Below is the "While Loop" that I have, as well as the ending line.
    public static void main(String[] args)
    String another ="1";
    while (another.equals("1"))
    .....NOW WHAT?......AS YOU CAN SEE, MY LOOP IS INCOMPLETE. I DON'T KNOW HOW TO CODE THE 0 PORTION.
    ...at the bottom after the System.out.Prinln() I have the following line of code:
    another = Console.readString("To place another order press(1). Press 0 to quit? ");
    Of course, the number 1 works but the 0 doesn't.
    Help and thanks.

    >
    public static void main(String[] args)
    String another ="1";
    while (another.equals("1"))
    .....NOW WHAT?......AS YOU CAN SEE, MY LOOP IS
    INCOMPLETE. I DON'T KNOW HOW TO CODE THE 0 PORTION.
    ...at the bottom after the System.out.Prinln() I have
    the following line of code:
    another = Console.readString("To place another order
    press(1). Press 0 to quit? ");
    Of course, the number 1 works but the 0 doesn't.
    You're right in principal. You don't have to do anything about checking 0, though it might be a good idea. So I reckon there's a syntax problem with the bit we're not seeing.
    If while controls more than one statement they have to be enclosed in curly brackets if you miss this it'll loop on the next statement only which, since it doesn't change your another will run forever.
    Incidentally a loop that runs at least once is better coded using the do .. while construct.
    I'd code it something like:
    String keepGoing = null;
    do {
       .... do your thing
       for(;;) {   // this is a "middle exit" loop
                // without the break it would run forever
          keepGoing = Console.readString("More to do? (Entery 0 or 1):").trim();  // trim removes spaces
          if(keepGoing.equals("0") || keepGoing.equals("1"))
               break;  // exit inner loop if valid
          keepGoing = Consile.readString("Eh?? Must be 0 or 1:");
       // now we know we have "0" or "1"
       } while(keepGoing.equals("1"));

  • Webflow/Pipeline looping

    I've been having some discussions with team members for a project I'm currently
    working on about looping in webflows and pipelines. I'm convinced that this is
    just not the best idea in general, especially when a loop involves webflow AND
    pipeline components. I believe that this type of thing should be handled either
    completely in a webflow component or elsewhere (an EJB for example).
    Here is one case. There is a webflow with a presentation node index.jsp,
    InputProcessors BeginIP and DecisionIP and a Pipeline component WorkPC.
    index.jsp calls BeginIP which calls WorkPC which calls DecisionIP which may call
    BeginIP. The diagram might look something like
    index.jsp ------> BeginIP -----------> WorkPC ---------> DecisionIP
    ^--------------------------------------------'
    (hopefully everyone can see that diagram, but the link on the bottom goes from
    DecisionIP to BeginIP).
    DecisionIP is responsible for determining if the looping should continue or if
    it should end. This could be done by verifying that a PipelineSession parameter
    was set, or whatever. This setup causes the business logic to span two IPs and
    it also forces the IPs to control the looping by returning the correct actions.
    In addition, it also requires that the IPs be programmed so that they can
    determine the current state (i.e. start of the loop, within the loop, outside
    the loop, etc.)
    This type of looping could also be accomplished by removing the DecisionIP and
    having WorkPC call BeginIP. This would centralize the work into a single IP that
    is now responsible for both handling the loop control, and the business logic.
    Of course, this could simplify the situation or complicate it depending on the
    circumstances.
    My solution to this problem is simple. Don't use Webflow/Pipeline to do looping.
    Besides the performance ramifications, doing this sort of things makes the IPs
    to heavy with flow control logic, which should really be left to the
    WebflowExecutor. Likewise, it causes the IPs to be more and more difficult to
    maintain, extend and reuse.
    Now here is some rough (really rough) pseudo code of the two solutions
    Webflow/pipeline looping:
    BeginIP.java
    if not in loop {
    do business logic
    } else if in loop {
    do different logic
    prepare for WorkPC call
    return "success";
    DescisionIP.java
    unpack from WorkPC call
    if WorkPC did not complete work {
    return "continue";
    return "finished";
    Direct looping:
    BeginIP.java
    do {
    business logic
    call Work
    business logic
    } while (Work not finished);
    One thing to notice about these two is that the second one did not use WorkPC
    because it is simply making a call to some Work that could be stored in a normal
    EJB (non-pipeline EJB that is).
    A few last notes and then I'm done. One thing I like about the direct looping
    method is that it is easy to see what is going on. You can tell that it is
    looping by just looking at the code. With the Webflow/Pipeline loop, you'll need
    to either open the EBCC or look in the wf file in order to fully understand the
    looping. This makes maintenance difficult, not to mention readability hard, for
    both the original developer and a new developer. Lastly, although not the
    biggest concern, the Webflow/Pipeline looping does much more work. It could
    potentially cause the BeginIP and DecisionIP to be instantiated each loop
    (depending on the WebflowExecutor's implementation). It forces two JNDI lookups
    and two remote calls each iteration (one for the Pipeline EJB and the second for
    the WorkPC EJB). It requires the IPs marshall and unmarshall data into and out
    of the PipelineSession (the only communicate method to Pipeline components). The
    direct looping does no reflection, no instantiation, one JNDI lookup, one remote
    call per iteration and requires no marshalling and unmarshalling via the
    PipelineSession.
    What does everyone else think?
    Brian Pontarelli

    Brian,
    I agree with Peter. This loop will definitely break.
    You should consider having both IP and PC, let IP do form validation and put
    parameters for the pipeline execution on the pipeline session. Pipeline will
    do the looping for you; which means you need to implement the loop within
    the PC. Also if this loop contains DB access, you might want to consider
    caching in order to avoid multiple trips to DB.
    Regards,
    Michael Goldverg
    "Peter Laird" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hi Brian,
    Your conclusion to not use Webflow for this purpose is correct in myopinion.
    Here are some more reasons:
    1) Webflow node traversal is done via recursion (for reasons too lengthyto explain
    here). Therefore, if your loop iterates for say 10,000 times, you will geta stack
    overflow before it completes.
    2) Ideally, Webflow components should not depend on other components beingin
    place in the Webflow graph. They should only depend on items in theHttpRequest
    or PipelineSession. Doing otherwise makes the Webflow very fragile. I knowin
    practice, this is a lofty goal that is hard to achieve, but its the rightphilosophy.
    So, building a construct that you diagramed makes the graph difficult tomaintain.
    >
    >
    3) I was on the design team for Webflow, and this was not a use case wetried
    to support. Consider a more coarse grained approach to the business logic,meaning
    the looping should be contained within a single IP or PC.
    Good luck with your project Brian!
    PJL
    "Brian Pontarelli" <[email protected]> wrote:
    I've been having some discussions with team members for a project I'm
    currently
    working on about looping in webflows and pipelines. I'm convinced that
    this is
    just not the best idea in general, especially when a loop involves
    webflow
    AND
    pipeline components. I believe that this type of thing should be handled
    either
    completely in a webflow component or elsewhere (an EJB for example).
    Here is one case. There is a webflow with a presentation node index.jsp,
    InputProcessors BeginIP and DecisionIP and a Pipeline component WorkPC.
    index.jsp calls BeginIP which calls WorkPC which calls DecisionIP which
    may call
    BeginIP. The diagram might look something like
    index.jsp ------> BeginIP -----------> WorkPC ---------> DecisionIP
    ^--------------------------------------------'
    >>
    (hopefully everyone can see that diagram, but the link on the bottom
    goes from
    DecisionIP to BeginIP).
    DecisionIP is responsible for determining if the looping should continue
    or if
    it should end. This could be done by verifying that a PipelineSession
    parameter
    was set, or whatever. This setup causes the business logic to span two
    IPs and
    it also forces the IPs to control the looping by returning the correct
    actions.
    In addition, it also requires that the IPs be programmed so that they
    can
    determine the current state (i.e. start of the loop, within the loop,
    outside
    the loop, etc.)
    This type of looping could also be accomplished by removing theDecisionIP
    and
    having WorkPC call BeginIP. This would centralize the work into a single
    IP that
    is now responsible for both handling the loop control, and the business
    logic.
    Of course, this could simplify the situation or complicate it depending
    on the
    circumstances.
    My solution to this problem is simple. Don't use Webflow/Pipeline to
    do looping.
    Besides the performance ramifications, doing this sort of things makes
    the IPs
    to heavy with flow control logic, which should really be left to the
    WebflowExecutor. Likewise, it causes the IPs to be more and moredifficult
    to
    maintain, extend and reuse.
    Now here is some rough (really rough) pseudo code of the two solutions
    Webflow/pipeline looping:
    BeginIP.java
    if not in loop {
    do business logic
    } else if in loop {
    do different logic
    prepare for WorkPC call
    return "success";
    DescisionIP.java
    unpack from WorkPC call
    if WorkPC did not complete work {
    return "continue";
    return "finished";
    Direct looping:
    BeginIP.java
    do {
    business logic
    call Work
    business logic
    } while (Work not finished);
    One thing to notice about these two is that the second one did not use
    WorkPC
    because it is simply making a call to some Work that could be stored
    in a normal
    EJB (non-pipeline EJB that is).
    A few last notes and then I'm done. One thing I like about the direct
    looping
    method is that it is easy to see what is going on. You can tell that
    it is
    looping by just looking at the code. With the Webflow/Pipeline loop,
    you'll need
    to either open the EBCC or look in the wf file in order to fullyunderstand
    the
    looping. This makes maintenance difficult, not to mention readability
    hard, for
    both the original developer and a new developer. Lastly, although not
    the
    biggest concern, the Webflow/Pipeline looping does much more work. It
    could
    potentially cause the BeginIP and DecisionIP to be instantiated each
    loop
    (depending on the WebflowExecutor's implementation). It forces two JNDI
    lookups
    and two remote calls each iteration (one for the Pipeline EJB and the
    second for
    the WorkPC EJB). It requires the IPs marshall and unmarshall data into
    and out
    of the PipelineSession (the only communicate method to Pipelinecomponents).
    The
    direct looping does no reflection, no instantiation, one JNDI lookup,
    one remote
    call per iteration and requires no marshalling and unmarshalling via
    the
    PipelineSession.
    What does everyone else think?
    Brian Pontarelli

  • Last value from a loop and values inside the loop

    Hi
    Sorry about the confusing heading above, but its late at night and better words do not occur to me rightaway. Let me explain my situation.
    I have a single instrument (a voltage source) that is being swept from one value to another for an experiment. It has three VI's : 1. enable o/p. 2. Set a voltage output level. 3. diable o/p.
    I am using the error in and error out pins of instrument vis to properly sequence operations. I connect the error out pin of VI 1 to the error in pin of VI 2. Each of these errors is a cluster of three values.
    When I try to wire the error out from VI 2 inside the loop to VI 3 outside the loop, the wiring breaks as I am then trying to connect an array (a 1 dimensional n member array of error outs) to a single error in pin. Trying to connect it to an array outside the loop is obviously the same. (I am making an assumption here - while the loop is running, I do not need to make certain of the sequencing of operations by putting a feedback node on VI 2 - that would mean something quite different in any case.).
    So, how do I pass the last value (in this case, the error out cluster from the last stage) to error in pin of VI 3 ?
    I have read that it might be possible using shift registers. I am quite new to LabVIEW. A somewhat detailed description of what I need to do would be nice.
    Thanks.

    Hello,
    There are basically two options:
    Handle the errors outside the for-loop
    Handle the errors inside the for-loop
    For you solution 1 is the easiest achievable, after the for loop use the 'Merge Errors' VI this will change the 1d-array into a cluster. The downside is that if an error occured later states of the loops don't know this
    Solution 2 uses the shift register you mentioned. To use this you have to right-click on the right hand-side tunnel of the error wire (where it leaves the for-loop) and select shift register, sequentially your mouse pointer changes into an downpointed arrow, click on the entry tunnel on the left of the for-loop. What happens is that an error in the for loop is remembered into the next iteration (use execution highlighting to watch these)
    Here is some code:
    A good start might be:
    The link to the LabVIEW Learning Center is here
    Ton
    Message Edited by TonP on 09-25-2006 08:01 AM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    Example_BD.png ‏5 KB

  • Infinite While-loop!

    Hey there! I'm trying to do some data input validation but I haven't been able to figure it out. First I need to check if the user entered anything, that one works. Then I need to check if what the user entered was a number. But I'm getting an infinite while loop in when I try to validate if the first character entered is a letter. . . .
    Thanks for your help!
    public class methods
    public static void main(String args[]) throws IOException
      String input ="";
      int qoh=0;
      boolean error=true;
      Scanner keyboard = new Scanner (System.in);
      //while (error)
                    //   error=true;
                            while (error==true)
                                System.out.print("\nEnter Quantity on Hand: ");
                                input = keyboard.nextLine();
                                if (input.length() <1)
                                    System.out.println("\n**ERROR06** - Quantity on hand must be between 0 and 500");
                                    error=true;
                                    System.out.println(qoh);
                                    System.out.println(input);
                                else
                                    error=false;
                            error = true;
                            while (error==true)
                                if (Character.isLetter(input.charAt(0)))
                                    System.out.println("\n**ERROR06** - Quantity on hand must be between 0 and 500");
                                    error=true;
                                    System.out.println(qoh);
                                    System.out.println(input);
                                else
                                    qoh = Integer.parseInt(input);
                                    error=false;
            }

    1. add in breakpoints to your program.
    Eg. put print statements before and after loops to confirm which loop is producing the inf loop error.
    also add in print statements in your if and else blocks.
    2. You should consider using keyboard.next() instead of nextLine()
    Eg. how are you going to handle "500 orange crush"?
    3. I have a feeling that the real problem lies at the 2nd loop where you tried to do a parseInt
    What happens if you have "5lmao" charAt(0) check is passed, but it wont produce a int will it?
    You might want to loop through every char in the input string to confirm they are a number.
    4. I suggest
    If(input.length() > 0) error = false
    else print msg
    OR
    assume no errors before loop.
    if(length() <1) error=true
    else error = false
    5. use the keyword "break". By that i mean set up your loop to be infinite loops, use the break operator under specified condition (error=false)
    I didn't identify the error for you, but i'd say the above methods should help you with your problem

  • Lot of unwanted apps at each synchonization (Asphalt, Block Breaker Deluxe 2, etc...)

    Hello all
    I've got a BB Curve 9300G.
    Each time I synchronize it with BB desktop Sw, it adds me several apps I do not want:
    Block Breaker Deluxe 2, Google Mobile App, AIM, Asphalt, Feeds Configs, etc...
    Is it linked with BB AppWorld addition ?
    Blackberry make such ads: "We want tools, not toys". So why force me to have those unwated and useless apps ?
    How could I definitely get ridd of this ? 
    I want to optimize my space storage on my device.
    Each time, I have to go in '"Annuaire de service" (sorry, I don't knwo exact US translation). and delete the unwanted apps & configs.
    Thanks all
    Fab

    Directory of Service? What information are you synching with DM and your device?
    I am not sure of some of the apps that you listed, but Social Feeds, Brick breaker usually come preinstalled with any OS. You should be able to delete the apps from your device by going though the Desktop Manager.
    You can also log into App World (From your device) and go to My World, and manually delete the apps that you do not want installed.
    Any app or program that doesn't appear in App World, usually means they were pushed by the carrier, or they have come pre-installed on the OS.

  • Errors 5006 and 1084

    hey, I'm getting errors 5006 and 1084 for my script, currently I'm making a game of brick breaker and can't figure out why I'm getting these errors. I get the 1084 error when auto formatting, and I get the 5006 error when exporting to a SWF
    my code is:
    package
              import flash.display.MovieClip;
              import flash.events.KeyboardEvent;
              import flash.ui.Keyboard;
              import flash.events.*;
              public class Main extends MovieClip
                        var player:paddle;
                        var ball:ball;
                        var home:startscreen;
                        var vx1:Number = 0;
                        var vx2:Number = 0;
                        ball = new aBall(5,5);
                        ball.x = 200;
                        ball.y = 50;
                        addChild(ball);
                        stage.addEventListener(KeyboardEvent.KEY_DOWN,onkeyDown);
                        stage.addEventListener(KeyboardEvent.KEY_UP, onkeyUp);
                        addEventListener(Event.ENTER_FRAME, Loop);
              public function onkeyDown(event:KeyboardEvent):void
                        //player controls
                        if (event.keyCode == Keyboard.DOWN)
                                  vx1 = -10;
                        else if (event.keyCode == Keyboard.LEFT)
                                  vx1 = 10;
              function onkeyUp(event:KeyboardEvent):void
                        // stop player one
                        if (event.keyCode == Keyboard.LEFT || event.keyCode == Keyboard.DOWN)
                                  vx1 = 0;
                        else if (event.keyCode == 87 || event.keyCode == 83)
                                  vx2 = 0;
              function onEdge(paddle)
                        if (paddle.x - (paddle.width/2) < 0)
                                  paddle.x = 0 + paddle.width / 2;
                        else if (paddle.x + (paddle.width/2) > stage.stageWidth)
                                  paddle.x = stage.stageWidth - paddle.width / 2;
              function Loop(event:Event):void
                        player1.y +=  vy1;
                        onEdge(player);
                        if (ball.hitTestObject(player))

    Which line is line 69?  If it happens to be at or after....  if (ball.hitTestObject(player))  that line appears to be missing an opening brace { at the end, as in...
    if (ball.hitTestObject(player)) {
    As for the  5006, the problem appears to be that you need to have all your functions defined within the class definition (Main).  Yours is attempting to have two items defined public at the same class level of the file.  So you need to take what I show in red below and nest it within the public class Main section as I attempt to show below.  The blue stuff I show may or may not lead to further problems since that would be more likely to appear in an init() function within the class (I am not an expert in class matters, nor many others for that matter)
    package
        import flash.display.MovieClip;
        import flash.events.KeyboardEvent;
        import flash.ui.Keyboard;
        import flash.events.*;
         public class Main extends MovieClip
               var player:paddle;
               var ball:ball;
               var home:startscreen;
               var vx1:Number = 0;
               var vx2:Number = 0;
               ball = new aBall(5,5);
               ball.x = 200;
               ball.y = 50;
               addChild(ball);
              stage.addEventListener(KeyboardEvent.KEY_DOWN,onkeyDown);
              stage.addEventListener(KeyboardEvent.KEY_UP, onkeyUp);
              addEventListener(Event.ENTER_FRAME, Loop);
              public function onkeyDown(event:KeyboardEvent):void
                        //player controls
                        if (event.keyCode == Keyboard.DOWN)
                                  vx1 = -10;
                        else if (event.keyCode == Keyboard.LEFT)
                                  vx1 = 10;
              function onkeyUp(event:KeyboardEvent):void
                        // stop player one
                        if (event.keyCode == Keyboard.LEFT || event.keyCode == Keyboard.DOWN)
                                  vx1 = 0;
                        else if (event.keyCode == 87 || event.keyCode == 83)
                                  vx2 = 0;
              function onEdge(paddle)
                        if (paddle.x - (paddle.width/2) < 0)
                                  paddle.x = 0 + paddle.width / 2;
                        else if (paddle.x + (paddle.width/2) > stage.stageWidth)
                                  paddle.x = stage.stageWidth - paddle.width / 2;
              function Loop(event:Event):void
                        player1.y +=  vy1;
                        onEdge(player);
                        if (ball.hitTestObject(player))

Maybe you are looking for

  • Exchange rate and BOM price update

    Dear all, I would like to update the price of my BOMs, in which I have components with prices in different currencies, according to the current exchange rate. I saw that if I use the yellow triangle at the bottom of the BOM's form I get the right val

  • Trash wont appear in mail only archive

    I have recently bought an Ipad mini a month ago and i have been deleting emails on my Ipad but suddenly one day when i went in the trash icon that appears at the top right corner of the email now changed to archive even though I dont have Gmail I onl

  • Date string problems

    Well lol, I am stuck with my valueOf strings. Here is my substring code. When I input 8 24 1989 it outputs Wednesday June 12 0015....lol      bdate     =JOptionPane.showInputDialog(null, "Enter your birthdate month (month, day, year):");      bmonth 

  • I have lost my navigational toolbar and file, edit,etc at top of screen.

    I was trying to fix my toolbar to get back my file, edit, top of page and the navigational toolbar went away. I can't get it back

  • External DB account Restriction

    Hi I am receiving "External DB account Restriction" Error message for ADS users after upgrading from 2000 to Windows 2003. I dont see any error for local ACS users and local windows database users. Any idea Thanks