Help With Online Game (Walking Talking)...

Hello, I just want to make like something like a game where you conrol a box, and can write messages to other people...
But the thing is that i am absolutely new in JAVA i don't know anything in it (totally)
So i would like to get some information in working with it... and things like that ^.^
P.S. I worked with GameMaker but I don't think that it will help me :|

I Don't know but it' didn't work maybe cause i am using vista???
when it didn't work i made a bat file and wrote there: javac HelloWorldApp.java
i think it did something but new file didn't appear anywhere. maybe it shuld appear in any other folder or something?
EDIT: I thought that vista doesn't let me to make new files in C disk so i copied the *.java file to the desktop and when i cmd i tried to javac it, the compiler started writing:
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
C:\Users\TDEsws\Desktop>javac HelloWorldApp.java
by his self... it didn't stop waited about 30seconds...
Edited by: TDEsws on Nov 5, 2008 5:37 AM

Similar Messages

  • Help with rhythm game

    So i am starting university in late september (to learn 3d character animation) and need to get the grades to get in, sadly we have a flash programming unit in the college course im in now and we didnt get taught anything at all and i mean nothing, we were given printed sheets and told to copy the code word for word. so i really need help with my game. how would i make the movement of something my cursor? so when i move the cursor it follows it? also how do i play an animation on click?
    My  idea for the game is to have a rhythm style game where the player moves the net and catches the bee's, something i thought would be simple to figure out how to do
    This is my game at the minute, ive used the code we were told to copy from sheets and just changed the sprites :\ any help would be amazing!
    https://www.dropbox.com/s/1pjbv2mavycsi3q/sopaceship%20rev7%20%20moving%20bullet.fla

    http://orangesplotch.com/blog/flash-tutorial-elastic-object-follower/
    var distx:Number;
    var disty:Number;
    var momentumx:Number;
    var momentumy:Number;
    follower.addEventListener(Event.ENTER_FRAME, FollowMouse)
    function FollowMouse(event:Event):void {
         // follow the mouse in a more elastic way
         // by using momentum
         distx = follower.x - mouseX;
         disty = follower.y - mouseY;
         momentumx -= distx / 3;
         momentumy -= disty / 3;
         // dampen the momentum a little
         momentumx *= 0.75;
         momentumy *= 0.75;
         // go get that mouse!
         follower.x += momentumx;
         follower.y += momentumy;

  • Memory issues with online games

    When playing online games I sometimes receive a message that I don't have enough memory to continue play or the games become so slow to respond that I restart Safari. I am wondering if there will be much difference if I replace the 256k memory for a 512k? Is there anything else I can check or try?
    I upgraded my operating system thinking that it might make a difference but it really hasn't. In fact it may be even worse.
    I perform the software update weekly and install everything that has to do with the actual operating system.
    If anyone has any ideas, they would be greatly appreciated.
    emac combo drive   Mac OS X (10.2.x)   800 mhz 768 ram

    Hi Alice
    Whilst Nortons is longer installed, it was a very instrusive installation, and I have posted a link which is the step by step instruction for uninstalling Nortons, that you may wish to wade through, just to check if the many components of Nortons have been removed from the nooks and crannies of your system.
    Symantec's Norton's Uninstall precedure
    Also check in Disk Utility, for your Hard disk, does the S.M.A.R.T. status say verified?
    However I am inclined to think it is more software than hardware. Having lots of RAM is always good but I am not sure if that really is the problem.
    So make sure all that Norton's stuff is gone and when things slow down in Safari emptying all the cookies seems to rejuvinate things for me.
    Also consider using Firefox as an alternative.
    I wish I could have helped you more definitively.
    regards roam

  • Connection problems with online games

    I have been having problems with all of online games while using the wireless WRT100 router. I am having problems connecting with all the players... Some players I can connect with, but some I can't. I think it might have something to do with a firewall or opening ports. Can someone please help me with this.

    are you palying computer games, or using gaming device like XBOX PS3 etc. Which games do you play? Did you try updating firmware?

  • Need help with online gaming

    When I play a online game my ping go very high and its started few days ago.
    I dont now what i can do.
    My internet is good.
    Can anyone help me?
    Also mi cant geth my memory higher.
    It says: 3,00 GB (2,60 GB avallible) how can i get it higher?

    > It says: 3,00 GB (2,60 GB available) how can i get it higher?
    Windows 32bit system can handle only 3.2GB RAM. This is 32bit limitation.
    I assume the system uses 2.6GB because the other part is used by graphic card.

  • I removed some plugins and i have trouble with online games now

    i don't know which add on or plug in is causing problem

    You need to post a link to the online game site that isn't working so someone can figure out what (plugin?) the site needs to work. Some popular plugins are listed here: [[Popular plugins]]. From your list of plugins, It looks like you already have Java plug-in 1.6.0_23 and 4.0.51204.0 (Silverlight) installed.
    You also need to tell us what happens when you visit the site. (Do you see an error message? Does Firefox crash or hang?)

  • Help with online support

    I've 3rd generation iPod Touch, bought in September. Now the right headphone isn't working anymore, and i'm trying to follow the process described on https://selfsolve.apple.com/ , but on the last page i receive the error message:
    +"We're sorry, the transaction cannot be completed at this time. Please try again later"+

    While there's very little we fellow users here on the forum can do to  help with regarding a refusal by Adobe's servers to activate your license, it might be helpful if you'd define exactly what you mean by "not accepting license".  It's possible you're having a basic installation problem, and not a problem with activation.
    What error message do you get, when?
    markonius wrote:
    tech support was very little help
    I'd like to make a public editorial comment on what seems like a bad recent trend...
    Adobe really needs to continue to support the reactivation of prior versions!
    Activation is not a feature that helps the customer, it's a feature that protects Adobe.  It comes at an ongoing cost - both to the customer and to Adobe, and it's simply not acceptable for them to choose to stop paying that cost, and not allowing people to continue to use the software that they legitimately licensed.
    Providing technical support for an older version is something that's completely different than providing activation support.
    We fall a bit into gray area where someone has trouble installing an old version of Photoshop on a new computer, but if the problem is just that the user has exceeded the allotted activation count then there's no excuse for being put off by Adobe Customer Support.  The activation technology is capable of continuing, as it has, to ensure the user isn't running the software on too many computers.
    I really, really hope that I'm misinterpreting what sounds like a bad trend based on recent comments on this forum about Adobe Customer Support not supporting people in reactivating their older software after a failure or computer replacement.
    -Noel

  • I need help with ipod games...

    Dear other Itunes users,
    I have multiple libraries that I currently use. The problem is not that I can not successfully get the games on the ipod, but that all the games(purchased on different computers) cannot coexist on the ipod. The message warns me and states that it will replace the other games I purchased with the games from my current library. How can I fix this?
    Thank you, tjd51.

    Use the Transfer Purchases option to place all of the games on one computer, and then sync the games from that computer.
    (30664)

  • Help with platform game

    I can't solve this for days already... When the hero object dies, the floorObject do not remove completely, such that one of them remains. And the hero object
    disappears. Thanks for all the help.
    package
              import flash.display.MovieClip;
              import flash.events.KeyboardEvent;
              import flash.events.*;
              import flash.utils.getTimer;
              public class Platform extends MovieClip
                        // movement constants
                        static const gravity:Number = .004;
                        // screen constants
                        static const edgeDistance:Number = 100;
                        // object arrays
                        private var fixedObjects:Array;
                        private var otherObjects:Array;
                        // hero and enemies
                        private var hero:Object;
                        private var enemies:Array;
                        // game state
                        private var playerObjects:Array;
                        private var gameScore:int;
                        private var gameMode:String = "start";
                        private var playerLives:int;
                        private var lastTime:Number = 0;
                        private var currentX:int = 0;
                        public function startPlatformGame()
                                  // constructor code
                                  gameMode = "play";
                        public function startGameLevel()
                                  createHero();
                                  addEnemies();
                                  // examine level and note all objects
                                  examineLevel();
                                  // add listeners
                                  this.addEventListener(Event.ENTER_FRAME,gameLoop);
                                  stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDownFunction);
                                  stage.addEventListener(KeyboardEvent.KEY_UP,keyUpFunction);
                                  // set game state
                                  gameMode = "play";
                        public function createHero()
                                  hero = new Object();
                                  hero.mc = gamelevel.hero;
                                  hero.dx = 0.0;
                                  hero.dy = 0.0;
                                  hero.inAir = false;
                                  hero.direction = 1;
                                  hero.animstate = "stand";
                                  hero.walkAnimation = new Array(2,3,4,5,6,7,8);
                                  hero.animstep = 0;
                                  hero.jump = false;
                                  hero.moveLeft = false;
                                  hero.moveRight = true;
                                  hero.jumpSpeed = .8;
                                  hero.walkSpeed = .15;
                                  hero.width = 30.0;
                                  hero.height = 40.0;
                                  hero.startx = hero.mc.x;
                                  hero.starty = hero.mc.y;
                        public function addEnemies() {
                                  enemies = new Array();
                                  var i:int = 1;
                                  while (true) {
                                            if (gamelevel["enemy"+i] == null) break;
                                            var enemy = new Object();
                                            enemy.mc = gamelevel["enemy"+i];
                                            enemy.dx = 0.0;
                                            enemy.dy = 0.0;
                                            enemy.inAir = false;
                                            enemy.direction = 1;
                                            enemy.animstate = "stand"
                                            enemy.walkAnimation = new Array(2,3,4,5);
                                            enemy.animstep = 0;
                                            enemy.jump = false;
                                            enemy.moveRight = true;
                                            enemy.moveLeft = false;
                                            enemy.jumpSpeed = 1.0;
                                            enemy.walkSpeed = .08;
                                            enemy.width = 30.0;
                                            enemy.height = 30.0;
                                            enemies.push(enemy);
                                            i++;
                        public function examineLevel()
                                  fixedObjects = new Array();
                                  otherObjects = new Array();
                                  for (var i:int=0; i<this.gamelevel.numChildren; i++)
                                            var mc = this.gamelevel.getChildAt(i);
                                            // add floors and walls to fixedObjects
                                            if (mc is Floor)
                                                      var floorObject:Object = new Object();
                                                      floorObject.mc = mc;
                                                      floorObject.leftside = mc.x;
                                                      floorObject.rightside = mc.x + mc.width;
                                                      floorObject.topside = mc.y;
                                                      floorObject.bottomside = mc.y + mc.height;
                                                      fixedObjects.push(floorObject);
                                            else if ((mc is Treasure) )
                                                      otherObjects.push(mc);
                                  fixedObjects.sortOn("leftside" , Array.NUMERIC );
                                  for each (floorObject in fixedObjects)
                                            trace(floorObject.leftside);
                        // add treasure, key and door to otherOjects;
                        public function keyDownFunction(event:KeyboardEvent)
                                  if (gameMode != "play")
                                            return;
                                  }// don't move until in play mode
                                  if (event.keyCode == 37)
                                            hero.moveLeft = true;
                                  else if (event.keyCode == 39)
                                            hero.moveRight = true;
                                  else if (event.keyCode == 32)
                                            if (! hero.inAir)
                                                      hero.jump = true;
                        public function keyUpFunction(event:KeyboardEvent)
                                  if (event.keyCode == 37)
                                            hero.moveLeft = false;
                                  else if (event.keyCode == 39)
                                            hero.moveRight = false;
                        public function gameLoop(event:Event)
                                  // get time differentce
                                  if (lastTime == 0)
                                            lastTime = getTimer();
                                  var timeDiff:int = getTimer() - lastTime;
                                  lastTime +=  timeDiff;
                                  // only perform tasks if in play mode
                                  if (gameMode == "play")
                                            moveCharacter(hero,timeDiff);
                                            checkCollisions();
                                            scrollWithHero();
                                            death();
                        public function moveCharacter(char:Object,timeDiff:Number)
                                  if (timeDiff < 1)
                                            return;
                                  // assume character pulled down by gravity
                                  var verticalChange:Number = char.dy * timeDiff + timeDiff * gravity;
                                  if (verticalChange > 15.0)
                                            verticalChange = 15.0;
                                  char.dy +=  timeDiff * gravity;
                                  // react to changes from key presses
                                  var horizontalChange = 0;
                                  var newAnimState:String = "stand";
                                  var newDirection:int = char.direction;
                                  if (char.moveLeft)
                                            // walk left
                                            horizontalChange =  -  char.walkSpeed * timeDiff;
                                            newAnimState = "walk";
                                            newDirection = -1;
                                  else if (char.moveRight)
                                            // walk right
                                            horizontalChange = char.walkSpeed * timeDiff;
                                            newAnimState = "walk";
                                            newDirection = 1;
                                  if (char.jump)
                                            // start jump
                                            char.jump = false;
                                            char.dy =  -  char.jumpSpeed;
                                            verticalChange =  -  char.jumpSpeed;
                                            newAnimState = "jump";
                                  // assume no wall hit, and hanging in air
                                  char.hitWallRight = false;
                                  char.hitWallLeft = false;
                                  char.inAir = true;
                                  // find new vertical position
                                  var newY:Number = char.mc.y + verticalChange;
                                  // loop through all fixed objects to see if character has landed
                                  for (var i:int=0; i<fixedObjects.length; i++)
                                            if ((char.mc.x+char.width/2 > fixedObjects[i].leftside) && (char.mc.x-char.width/2 < fixedObjects[i].rightside))
                                                      if ((char.mc.y <= fixedObjects[i].topside) && (newY > fixedObjects[i].topside))
                                                                newY = fixedObjects[i].topside;
                                                                char.dy = 0;
                                                                char.inAir = false;
                                                                break;
                                  // find new horizontal position
                                  var newX:Number = char.mc.x + horizontalChange;
                                  // loop through all objects to see if character has bumped into a wall
                                  for (i=0; i<fixedObjects.length; i++)
                                            if ((newY > fixedObjects[i].topside) && (newY-char.height < fixedObjects[i].bottomside))
                                                      if ((char.mc.x-char.width/2 >= fixedObjects[i].rightside) && (newX-char.width/2 <= fixedObjects[i].rightside))
                                                                newX = fixedObjects[i].rightside + char.width / 2;
                                                                char.hitWallLeft = true;
                                                                break;
                                                      if ((char.mc.x+char.width/2 <= fixedObjects[i].leftside) && (newX+char.width/2 >= fixedObjects[i].leftside))
                                                                newX = fixedObjects[i].leftside - char.width / 2;
                                                                char.hitWallRight = true;
                                                                break;
                                  // set position of character
                                  char.mc.x = newX;
                                  char.mc.y = newY;
                                  // set animation state
                                  if (char.inAir)
                                            newAnimState = "jump";
                                  char.animstate = newAnimState;
                                  // move along walk cycle
                                  if (char.animstate == "walk")
                                            char.animstep +=  timeDiff / 60;
                                            if (char.animstep > char.walkAnimation.length)
                                                      char.animstep = 0;
                                            char.mc.gotoAndStop(char.walkAnimation[Math.floor(char.animstep)]);
                                            // not walking, show stand or jump state
                                  else
                                            char.mc.gotoAndStop(char.animstate);
                                  // changed directions
                                  if (newDirection != char.direction)
                                            char.direction = newDirection;
                                            char.mc.scaleX = char.direction;
                        public function checkCollisions()
                                  for (var i = otherObjects.length-1; i >= 0; i--)
                                            if (hero.mc.hitTestObject(otherObjects[i]))
                                                      getObject(i);
                                  for (var j:int = enemies.length-1; j>=0; j--)
                                            if (hero.mc.hitTestObject(enemies[j].mc))
                                                      currentX = hero.mc.x;
                                                      gameComplete();
                        public function scrollWithHero()
                                  var stagePosition:Number = gamelevel.x + hero.mc.x;
                                  var rightEdge:Number = stage.stageWidth - edgeDistance;
                                  var leftEdge:Number = edgeDistance;
                                  if (stagePosition > rightEdge)
                                            gamelevel.x -= (stagePosition-rightEdge);
                                            if (gamelevel.x < -(gamelevel.width-stage.stageWidth))
                                                      gamelevel.x = -(gamelevel.width-stage.stageWidth);
                                  if (stagePosition < leftEdge)
                                            gamelevel.x += (leftEdge-stagePosition);
                                            if (gamelevel.x > 0)
                                                      gamelevel.x = 0;
                        public function getObject(objectNum:int)
                                  if (otherObjects[objectNum] is Treasure)
                                            gamelevel.removeChild(otherObjects[objectNum]);
                                            otherObjects.splice(objectNum,1);
                        public function death()
                                  if (hero.mc.y > 300)
                                            currentX = gamelevel.hero.x;
                                            trace(currentX);
                                            gameComplete();
                        public function gameComplete()
                                  gameMode = "dead";
                                  var dialog:Dialog = new Dialog();
                                  dialog.x = 175;
                                  dialog.y = 100;
                                  addChild(dialog);
                                  dialog.message.text = "Gameover";
                        public function clickDialogButton(event:MouseEvent)
                                  removeChild(MovieClip(event.currentTarget.parent));
                                  // new life, restart, or go to next level
                                  if (gameMode == "dead")
                                            // reset hero
                                            hero.mc.x = currentX;
                                            hero.mc.y = 0;
                                            trace("dead");
                                            setReplay();
                                            gameMode = "play";
                                  // give stage back the keyboard focus
                                  stage.focus = stage;
                        public function setReplay()
                                  for (var i:int = fixedObjects.length-1; i>-1; i--)
                                            if (fixedObjects[i].leftside < currentX)
                                                      this.gamelevel.removeChildAt(fixedObjects[i]);
                                                      fixedObjects.splice(i,1);
                                                      trace("Splice?");
                                  for each (var floorObject in fixedObjects){
                                            trace(floorObject.leftside);
                        public function cleanUp()
                                  removeChild(gamelevel);
                                  this.removeEventListener(Event.ENTER_FRAME,gameLoop);
                                  stage.removeEventListener(KeyboardEvent.KEY_DOWN,keyDownFunction);
                                  stage.removeEventListener(KeyboardEvent.KEY_UP,keyUpFunction);

    Ok, I fiured it all out, the other way you mentioned. Just opened up the character MC, and named 2 frames. One LEFT and one RIGHT. Then I added a few simple lines of code, and turned out with this:
    if (Key.isDown(Key.RIGHT)) {
    _x += speed;
    this.gotoAndStop("right");
    if (Key.isDown(Key.LEFT)) {
    _x -= speed;
    this.gotoAndStop("left");
    Thanks for helping!!!

  • Help with j2me games

    I'm a student that needs help for my school thesis.I'm new to j2me. I'm trying to develop a multiplayer game via GPRS. i have a few general question to ask.I',m doing a round robin game.
    1) I saw in the nokia forum about the http server and tcp server. What is the main difference?Isn't the internet stack is divided to application, transport and network layer and so on?why will have http server and tcp server?isn't that tcp connection also implemented in http server?
    2) In the http server, the server won't start a connection with the client. If i send a http request to the server to start a new game with my opponent, how do the server will nodify my opponent?My opponent don't know i'm sending a game to him.
    3) Is that tcp server has already successfully implemented now?Is there any free tcp server or i need to code it in J2se?
    4) Is that using WAP or IP router to send the internet stack to the server?Which 1 is better?

    internet stack is divided to application, transport
    and network layer and so on?Yes, but a mobile might not have a IP stack, instead a simple connection to a proxy server, which "talks" to the net.
    how do the server will nodify my opponent?My opponent
    don't know i'm sending a game to him.Perodic updates (polling).
    3) Is that tcp server has already successfully
    implemented now?I dont understand the question. Has anyone used TCP/IP on mobile phones (as client software), yes me: http://j2mevnc.sourceforge.net
    Has anyone used the serversocket. Other than demo-ware, not that I know of, not many phones support socket://, let alone serversocket://
    4) Is that using WAP or IP router to send the internet
    stack to the server?Which 1 is better?Depends on your need.

  • Please Help with online gaming problem. Please.

    Hi. I am new to this website and I searched in the faqs but did not get much help. How do I play Age of Empires 2: Age of Kings with my cousin through online DirectPlay while the router is connected to my DSL modem? My cousin lives 9 to 10 blocks away from me and we usually use to play the game online through DirectPlay but ever since I got the router, he cannot enter my game any more. We don't play through a website or anything similar.
    Please Can someone help me.
    Info
    Computer: Windows XP Service Pack 2
    Router: WRT54G Version.8
    AT&T Yahoo DSL Modem
    Thank you for your time.

    This type of problem usually happens w/ DSL. On your PC lets try doing these steps. Open up Internet Explorer. On the address bar, just type the numbers 192.168.1.1 (username just leave it blank, password as default is admin). This should lead you to a linksys page. Go to status. On the status page, what is the Internet IP Address as listed there?

  • Please! I need someone help with a game

    I got this Error everytime the scene is reseted. I have no clue where mistake is made. Please help!
    TypeError: Error #1010: A term is undefined and has no properties.
        at golfer_fla::MainTimeline/resetScene()
        at golfer_fla::MainTimeline/golfer_fla::frame1()
    TypeError: Error #1010: A term is undefined and has no properties.
        at golfer_fla::MainTimeline/resetScene()
        at golfer_fla::MainTimeline/countDown()
        at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
        at flash.utils::Timer/flash.utils:Timer::tick()
    If that helps I could send my game by mail so someone could check the error which constantly pop out when the golfer hit the ball, ball stops and the scene resets.
    Here is the code:
    //Variables
    var myHead = new head();
    var myArms = new arms();
    var myBody = new body();
    var myStick = new stick();
    var myGround = new ground();
    var myFlag = new flag();
    var myCapsel = new capsel();
    var grassMask:Number;
    var speedUp:int = 2;
    var speedDown:int = speedUp * 8;
    var checker:int;
    var minPower:int;
    var maxPower:int = 110;
    var strength:Number;
    var capselPower:Number;
    var distance:Number;
    var target:int;
    var tryShot:int = 0;
    var myTimer = new Timer(2000, 1);
    //EventListeners
    stage.addEventListener(KeyboardEvent.KEY_DOWN, onDown);
    stage.addEventListener(KeyboardEvent.KEY_UP, onUp);
    stage.addEventListener(Event.ENTER_FRAME, hit);
    myTimer.addEventListener(TimerEvent.TIMER, countDown);
    //Functions
    function resetScene():void {   
        addChild(myBody);
        addChild(myArms);
        addChild(myHead);
        addChild(myStick);
        addChild(myGround);
        addChild(myFlag);
        addChild(myCapsel);
        grassMask = (320 + Math.random()*260);
        myBody.x = 70;
        myBody.y = 296;
        myArms.x = 68;
        myArms.y = 276;
        myArms.rotation = 0;
        myHead.x = 70;
        myHead.y = 215;   
        myStick.x = 68;
        myStick.y = 276;   
        myStick.rotation = 0;
        myCapsel.x = 90;
        myCapsel.y = 331;
        myGround.x = 0;
        myGround.y = 375;
        myGround.grassMask.x = grassMask - 610;
        myFlag.x = grassMask;
        myFlag.y = 375;
        checker = 0;
        minPower = 0;
        target = 0;
        tryShot ++;
        myCapsel.capselFall.gotoAndStop(1);
        myMessage.text = "Press any key!";
    resetScene();
    function invisibleCapsels():void {   
        a1.visible = false;
        a2.visible = false;
        a3.visible = false;
        a4.visible = false;
        a5.visible = false;
        a6.visible = false;
        a1.gotoAndStop(1);
        a2.gotoAndStop(1);
        a3.gotoAndStop(1);
        a4.gotoAndStop(1);
        a5.gotoAndStop(1);
        a6.gotoAndStop(1);
    invisibleCapsels();
    function onDown(e:KeyboardEvent):void {
        checker = 1;
        minPower = -20;
    function onUp(e:KeyboardEvent):void {
        checker = 0;
        capselPower = (myCapsel.x + myStick.rotation) * 3.2;
    function hit(e:Event):void {
        if(tryShot < 7) {
            if((checker == 1) && (myStick.rotation < maxPower)) {
                myStick.rotation += speedUp;
                myArms.rotation += speedUp;
                } else {
                    if(myStick.rotation > minPower) {
                        myStick.rotation -= speedDown;
                        myArms.rotation -= speedDown;
                    if(myStick.hitTestObject(myCapsel)) {
                        stage.addEventListener(Event.ENTER_FRAME, shot);
                } else {
                    myMessage.text = "Game Over\nClick to play again";
                    stage.addEventListener(MouseEvent.MOUSE_DOWN, playAgain);
    function playAgain(e:MouseEvent):void {
        resetScene();
        invisibleCapsels();
        tryShot = 1;
        stage.removeEventListener(MouseEvent.MOUSE_DOWN, playAgain);
    function shot(e:Event):void {
        strength = (capselPower - myCapsel.x);
        distance = grassMask - myCapsel.x;
        if((Math.round(distance) <= 10) && (Math.round(distance) >= 3) && (strength <= 65)) {
            if(target == 0) {
                myCapsel.capselFall.play();
                myCapsel.rotation = 0;
                target = 1;
                this["a" + tryShot].visible = true;
                myMessage.text = "Cooool!";
                myTimer.start();
            } else {
                if(strength > 5) {
                    myCapsel.x += strength / 30;
                    myCapsel.rotation += strength / 4;
                    } else {
                        this["a" + tryShot].visible = true;
                        this["a" + tryShot].gotoAndStop(2);
                        myMessage.text = "Bad Luck!";
                        myTimer.start();
    function countDown(e:TimerEvent):void {
        resetScene();
        stage.removeEventListener(Event.ENTER_FRAME, shot);

    Try adding the following two lines before line 59:
    trace(myCapsel);
    trace(myCapsel.capselFall);
    If one of them traces undefined, it should isolate which object is the problem.  If you describe what is involved with that object.child, then it may help generate an idea of what might be wrong.

  • HELP WITH ONLINE LOG IN

    Hi  I have recently split with my husband who was the named person on my orange mobile account. We have gone through the process of changing the account and direct debit details over to my name but i am now having trouble logging into my account online and on the app because when i log in it is still brings up my husbands details. I have tried re registering with my new account number but because the mobile number is already registered online this isnt working.  I hope I've explained things properly and i hope you can help. Thanks for your time.  

    This should be simple to fix. Sometimes the link between your Orange account and your online account becomes broken or takes a while to update itself.
    In order to get this resolved, you'll need to speak to Orange customer services and ask them to delete your online account profile.
    Once they've done this, you'll be able to register with your mobile number and this should now display your details.

  • Help with online high scores

    I'm working on a marathon runner game ( http://www.locopuyo.com/MarathonRunnerBeta1.zip ) just for the fun of it. What I am wondering is what the best way to make a high scores list would be.
    I have mySQL on my server, I don't know if that is the best way to do it though.
    I don't know at all how to connect files on the internet with java.
    I was thinking it might be easier if I just had a plain html web site that I could edit in my java program using ftp, but I don't know how to do that and dont' even know if it is possible.
    Any help would be much appretiated.

    since you have MySQL on your server, I'm going to go ahead and assume you have PHP installed also. If so, you can do the highscore work in PHP and just have the game query that script. Basically (if you know anything about PHP and web queries in general) you just query the URL of the PHP script with a few GETVARS. In the simplest (and most easily hacked) way is something like:
    http://yourserver.com/game/highscore.php?action=submit&name=bob&score=5000highscore.php (your script) would then use MySQL to store the data of the GETVARS ($action,$name, and $score).
    All you need in Java to query this script is the URL class.
    URL url = new URL("http://yourserver.com/game/highscore.php?action=submit&name=bob&score=5000");
    url.openConnection(); // this is where it is queriedhighscore.php is where you need to do your database work. If you don't know anything about PHP or if this sounds too easily hacked, you might look into connecting to MySQL via JDBC (see tutorial)
    If I find the time I can make a simple template for you to build off of

  • Need help with a game..

    I was wondering if anyone can help me out with a little problem.
    Little info about the code:
    I am creating a game, where a player has to answer a set of math questions with answers that are only
    in whole numbers. If you look at method: showQuestion() I have used a for loop show the question on a
    label. There are no compile errors. So i assume, the problem is related to exception handling or something
    the problem:
    if you look at the last method actionPerformed(ActionEvent e), in there when you click the nextQ button
    i get paragraphs exception errors, or so i think there exceptions, im new to programming so tend to get
    jumbled now and again.
    extra info:
    There is another class called Questions, too long to paste here, but in that class i have defined
    the questions and corresponding answers in arrays as such:
    String[] Questions = new String[50];
    int [] Answers = new int[50]
         Question[0] = "What is 2 x 8? ";
         Answer[0] = 16;
         etc etc for the entire 50 questions. so you get my idea here.
    again if you look at showQuestion() whatever question is displayed its answer is worked out using the
    index i.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Game extends Questions implements ActionListener
        /** Global Variables Declared */
        /** Global Variables for Components in GUI */
        /** Constructor initialise game */
        public void showQuestion()
            int i;
                for(i=0; i<Questions.length; i++)
                        showQuestion.setText(Questions);
    Answer = Answers[i];
    public void makeFrame()
    // Creates Frame
    // Labels
    // TextBox for user input
    // Buttons
    // Sets Frame size
    // Listen to events (addActionListener)
    // Container ContentPane and add components to it
    // Frame Close and Visibility properties
    public void actionPerformed(ActionEvent e)
    // if QuitGame button is pressed do the following...
    if(e.getSource()==NextQ) {
    showQuestion.setText("Question 1: " + Questions[i]);
    else {            

    Dude are all 50 questions and answers in the array occupied?
    * array.length is the capacity of the array, not "how many are occupied".
    2. You're typically better of using an ArrayList instead of an array, because ArrayList's are resized dynamically.
    3. don't use "paralell" arrays... instead create a class which keeps your shite together, and then create a collection of them... something like...
    class QuestionTO { // to stands for Tranfer Object
      private final String question;
      private final String answer;
      public QuestionTO(String question, String answer) {
        this.question = question;
        this.answer = answer;
      public String getQuestion() { return this.question; }
      public String getAnswer() { return this.answer; }
      public String toString("<Question question=\""+getQuestion()+"\" answer=\""+getAnswer()+"\" />");
    class Questionarre {
      List<QuestionTO> questions = new ArrayList<QuestionTO>();
      public void print(PrintStream out) {
        for (QuestionTO question : questions) {
          out.println(question.toString()));
    }Hope that helps some... even if it's "a bit beyond" you at the moment... doing stuff "the proper way" is most often easier, coz the super-geeks have done most of the heavy lifting for you.
    Keith.

Maybe you are looking for

  • Vastly different performance of identically configured databases...

    I’m using Oracle Text to retrieve data from a large table (5 million rows or so). The index is created simply: CREATE INDEX ALT_DEV_IDX ON devtable(searchfield) INDEXTYPE IS CTXSYS.CONTEXT; …and then I do my best to make sure the thing is loaded into

  • 2011 Macbook Pro appears to have only Win7

    Hey all,   I'm a Mac newbie. Took a 2011 Macbook in trade for a Windows laptop from a friend because he said "It don't work good." I booted it up and I see what he meant. Macbook boots into Windows. Here's what I found: Syatem tray has Bootcamp in it

  • EPMA 11.1.2.1 Property Differences from Earlier Releases

    Hi All, Just wondering if someone could shed some light on the below: We are upgrading from 9.3.1 to 11.1.2.1 and have noticed that quite a few of our EPMA Planning properties have changed in 11.1.2.1. This seems to be documented P379 of the EPMA 11.

  • How can I wrap text in a circle in pages? (Or any other way)

    Thanks

  • Matching files in 2 folders

    I have two folders that should have the same number of files after performing a Save As into a second folder action. The first folder has 448 large tiffs, the other has 447 low-res jpegs. The file names are the same apart from the extension. Is there