Why will neither of my characters jump?

Main.as:
package
  import flash.display.Bitmap;
  import flash.display.Sprite;
  import flash.events.Event;
  import flash.events.KeyboardEvent;
  * @author Harry
  public class Main extends Sprite
  public var FireBoy:Hero;
  public var WaterGirl:Female;
  public var Door1:Firedoor;
  public var Door2:Waterdoor;
  public function Main():void
  if (stage) init();
  else addEventListener(Event.ADDED_TO_STAGE, init);
  private function init(e:Event = null):void
  removeEventListener(Event.ADDED_TO_STAGE, init);
  // entry point
  FireBoy = new Hero ();
  stage.addChild(FireBoy);
  FireBoy.y = 495;
  //This allows movement for FireBoy
  stage.addEventListener(KeyboardEvent.KEY_DOWN, HandleHeroMove);
  WaterGirl = new Female();
  stage.addChild(WaterGirl);
  WaterGirl.x = 70;
  WaterGirl.y = 495;
  stage.addEventListener(KeyboardEvent.KEY_DOWN, HandleFemaleMove);
  Door1 = new Firedoor();
  stage.addChild(Door1);
  Door1.x = 5;
  Door1.y = 62;
  Door2 = new Waterdoor();
  stage.addChild(Door2);
  Door2.x = 100;
  Door2.y = 62;
  graphics.beginFill(0x804000, 1);
  graphics.drawRect(0, 0, 800, 40);
  graphics.endFill();
  graphics.beginFill(0x804000, 1);
  graphics.drawRect(0, 170, 600, 40);
  graphics.endFill();
  graphics.beginFill(0x804000, 1);
  graphics.moveTo(800, 200);
  graphics.lineTo(800, 700);
  graphics.lineTo(400, 700);
  graphics.lineTo(100, 700);
  graphics.endFill();
  graphics.beginFill(0x804000, 1);
  graphics.drawRect(0, 580, 800, 40);
  graphics.endFill();
  //This handles FireBoys movement
  public function HandleHeroMove(e:KeyboardEvent):void
  trace(e.keyCode);
  //This is for moving to the left
  if (e.keyCode == 37)
  FireBoy.x = FireBoy.x - 30;
  Check_Border();
  //This is for moving to the right
  else if (e.keyCode == 39)
  FireBoy.x = FireBoy.x + 30;
  Check_Border();
  else if (e.keyCode == 38)
  FireBoy.grav = -15;
  //This handles WaterGirls movement
  public function HandleFemaleMove (e:KeyboardEvent):void
  trace(e.keyCode);
  //This is for moving to the left
  if (e.keyCode == 65)
  WaterGirl.x = WaterGirl.x - 30;
  Check_Border();
  //This is for moving to the right
  else if (e.keyCode == 68)
  WaterGirl.x = WaterGirl.x + 30;
  Check_Border();
  else if (e.keyCode == 87)
  WaterGirl.grav = -15;
  //This stops characters from leaving the screen
  public function Check_Border():void
  if (FireBoy.x <= 0)
  FireBoy.x = 0;
  else if (FireBoy.x > 750)
  FireBoy.x = 750;
  if (WaterGirl.x <= 0)
  WaterGirl.x = 0;
  else if (WaterGirl.x > 750)
  WaterGirl.x = 750;
Hero.as:
package 
  import flash.display.Bitmap;
  import flash.display.Sprite;
  * @author Harry
  public class Hero extends Sprite
  [Embed(source="../assets/FireBoy.jpg")]
  private static const HeroFireBoy:Class;
  private var FireBoy:Bitmap;
  public var grav:int = 0;
  public var floor:int = 580;
  public function Hero()
  FireBoy = new Hero.HeroFireBoy();
  scaleX = 0.1;
  scaleY = 0.1;
  addChild(FireBoy);
  public function adjust():void
  FireBoy.y += grav;
  if(FireBoy.y+FireBoy.height/2<floor)
  grav++;
  else
  grav = 0;
  FireBoy.y = floor - FireBoy.height / 2;
  if (FireBoy.x - FireBoy.width / 2 < 0)
  FireBoy.x = FireBoy.width / 2;
  if (FireBoy.x + FireBoy.width / 2 > 800)
  FireBoy.x = 800 - FireBoy.width / 2;
Female.as:
package 
  import flash.display.Bitmap;
  import flash.display.Sprite;
  * @author Harry
  public class Female extends Sprite
  [Embed(source = "../assets/WaterGirl.png")]
  private static const FemaleWaterGirl:Class;
  private var WaterGirl:Bitmap;
  public var grav:int = 0;
  public var floor:int = 580;
  public function Female()
  WaterGirl = new Female.FemaleWaterGirl();
  scaleX = 0.1;
  scaleY = 0.1;
  addChild(WaterGirl);
  public function adjust():void
  WaterGirl.y += grav;
  if(WaterGirl.y+WaterGirl.height/2<floor)
  grav++;
  else
  grav = 0;
  WaterGirl.y = floor - WaterGirl.height / 2;
  if (WaterGirl.x - WaterGirl.width / 2 < 0)
  WaterGirl.x = WaterGirl.width / 2;
  if (WaterGirl.x + WaterGirl.width / 2 > 800)
  WaterGirl.x = 800 - WaterGirl.width / 2;

usually something in your handlemove functions where you decrease a characters y property.

Similar Messages

  • Why will my I phone not connect with my IMac it pairs?

    Why will my I Phone not connect with my IMAC it pairs?

    Since you use the work "pairs", I must assume you're talking about bluetooth.
    Unless you're trying to use the personal hotspot to tether the computer to the phone, you can't do that...
    You can only use bluetooth with a computer for tethering.  Bluetooth file sharing is not supported. Neither is bluetooth sync.

  • Why will Safari not launch Eudora when I click on an email link?

    It used to work just fine. However, for about a month now, when I click on "send an email" at my Real Estate Board site, Safari is replaced by a white screen, then reverts back to the "send an email" page. Eudora doesn't launch. Mail doesn't launch. I have Internet Explorer for Mac installed as well, and it won't connect via my e-mail programs either.
    I also run Virtual PC, and under it, Internet Explorer. The Windoze version still works.
    What gives?

    Let me restate my problem.
    If I run Safari, click on the email link which should launch Eudora and open a "New Message" window, the screen goes white for a second and reverts back to the link screen but nothing happens. If I launch Eudora first, then in Safari click on the link, still nothing happens.
    If I run Explorer for Mac v 5.2.3 it will neither launch Eudora nor open a New Message window if Eudora is already launched.
    If I run FireFox, and I click on the link, Eudora will launch and a New Message window opens as it used to do in Safari.
    I could really use some help here. Any ideas? Why should I have to use 3rd party browsers?

  • Why will the new version of picasa not work on my imac

    Why will my upgraded version of picasa not work on my IMac???HELP
    It will start to load and then error message and cuts off. ( Picasa is photo editing software)

    Picasa is not an Apple product.
    You should ask the developers why they have not updated their application.

  • Why will the front camera on my iphone 4 not work? On both the camera and snapchat.

    Why will the front camera on my iphone 4 not work? On both my camera and snapchat

    Hi there bananas321,
    You may want to try force closing all open apps and resetting the device as an initial troubleshooting step. Take a look at the articles below for more information.
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    -Griff W.

  • Why will adobe flash player not work on my mac?

    Hi, I just got my mac back from the apple store and sadly I lost all my data so its a 'new mac' and i had to set it up from scratch etc.
    I am unable to watch videos on youtube and other sites that need Java or Adobe flash player EVEN THOUGH I have downloaded and uninstalled several times and each time it doesnt work. Ive checked in safari prefferences that 'enable java-script' and 'enable plug-ins' is on but it still will not work!
    Ive been on system prefferences and checked the java and adobe application prefferences to see if i can add the websites oor something but it will not work.
    my mac is deffinetly up to date to the latest version, i have checked several times and i have made sure that it is the correct adobe flash player most recently updated etc, but it will still not work! ive been researching for a couple of days now and cant find anything that works.
    Someone Please Help!!!!!
    This is a screen shot of what is happening with the adobe flash player:
    'clicking on manage website settings'
    why will it not work!!??
    please help!!!!

    The reference in the screenshot  above is about "Adobe Reader", not about Adobe Flash Player."
    Install Adobe Flash Player
    http://get.adobe.com/flashplayer/
    Security turned on?
    System Preferences >  Security & Privacy > General
    Select App store & identified developers

  • Why will photoshop not download on my mac

    why will photoshop not download on mac

    Hi theuyuseewalkingdownthes,
    Do you get any error message while downloading.
    Regards,
    Romit Sinha

  • Why will itunes not install on my macbook pro

    Why will I-tunes not work on my brand new macbook pro?

    Yes, it asks me to download 10.6.3 but when i click update it says.  The update “iTunes” can’t be installed.  The update could not be verified. It may have been corrupted during downloading. The update will be downloaded and checked again the next time that Software Update runs.  I have updated all other updates and restarted the computer multiple times with no luck.

  • I can no longer edit the info for my songs, movies and tv shows.  This occurred since I loaded Windows 7 Pro on my C drive, and then fownloaded ITunes 10.  Why will the program not allow me to access the track info to edit it?

    I can no longer edit the info for my songs, movies and tv shows.  This occurred since I loaded Windows 7 Pro on my C drive, and then fownloaded ITunes 10.  Why will the program not allow me to access the track info to edit it?

    Ah yes school boy error there out of frustration and discontent..
    My issue is with music/apps/films etc not downloading from iTunes / App Store.
    They initially fail and message is displayed stating unable to download / purchase at this time, yet if I retry it says I've already purchased (?) or alternatively I go to the purchased section and there they are waiting with the cloud symbol..
    However some items get frozen in the download window and cannot be retried or deleted. Message appears stating to tap to retry, but even if you stole every bath and sink in the uk you'd still not have enough taps.
    I post here as the iTunes guys are useless in there 'help' and have only advised posting here or phoning apple, at my expense, to explain a problem that could be rectified by forwarding my original email to a techie. However the tech team apparently don't have an email address as they're from ye olde Middle Ages..!
    Anyways I digress.
    So I tried sync to pc, but instead of showing the file as ready to listen/use/view, the iCloud symbol shows and I'm back to square one as the item is unable to download..
    At frustration station waiting for a train from pain...
    All my software is up to date, and had all worked fine prior to the last big iOS update that resulted in all the changes in display and dismay.
    Answers in a postcard :-)
    Much love

  • Why will my iphone 5c not show up as a device on my itunes?

    why will my iphone 5c not show up as a device on my itunes? this is the first time it has ever happened ?

    Here is the troubleshooter:
    http://support.apple.com/kb/TS1538

  • Why will my photoshop no longer open

    Why will my photo shop element 7 not open any more, I suspect it is to force me into a subscription to the cloud service now being offered by Adobe.

    Also if the keychain password for your network is not the same or your network encryption is not the same as the router you will not be able to connect. Also if you network provider has automatic DHCP then there is no reason to manually set it up yourself.https://support.apple.com/kb/PH18522?locale=en_US

  • Trying to install update 8.1.3, my iPad says I need 1.5 gb but I actually have 17.1 gb. Why will it not let me install?

    Trying to install update 8.1.3, my iPad says I need 1.5 gb but I actually have 17.1 gb. Why will it not let me install?

    It's probably telling you that you need 1.5 more GB than you have available. Hook up your device to iTunes on the computer you sync with and do the update from there. OTA updates require a lot more memory than ones done via iTunes.
    Cheers,
    GB

  • HT1364 why will my ipad2 connect to itunes but not my iphone 4s

    why will my ipad2 connect to itunes but not my iphone 4s

    why will my ipad2 connect to itunes but not my iphone 4s

  • I use classical Hebrew for my work, and Pages will only display English characters even with a Hebrew font selected. If I cut and paste Hebrew characters from another document, as long as the font is supported, it will appear in Pages.  If I type it won't

    I use classical Hebrew for my work, and Pages will only display English characters even with a Hebrew font selected. If I cut and paste Hebrew characters from another document, as long as the font is supported, it will appear in Pages.  If I type it won't continue in Hebrew.  I have tried downloading several fonts, including those from professional societies, but the only way to get Hebrew in my document is to cut and paste.  Does anyone know how to fix this?  I use an older MacBook running OS 10.9.1.  I used to do my Hebrew work in Word, but it is no longer supported by Mac OS.

    Just clarifying:
    Pages '09 has bad support for Hebrew, Arabic etc but will accept pasted text.
    Pages 5 has much better support but with bugs.
    If you have columns they are in the wrong order ie Text starts in the left column and ends in the right column.
    If you type English into Hebrew text it tends to fall in the wrong position eg instead of to the left of Hebrew punctuation it goes to the right.
    As Tom recommends the only real solution on the Mac is Mellel.
    Peter
    btw Tell Apple, they are amazingly slow to fix this running sore which has been broken since RtoL was supposedly introduced in OSX 10.2.3 over a decade ago.
    Peter

  • Why  will photoshop not open after loading it to new iMac computer from an external hard drive and I get this message: Licensing for this product has stopped working:error code: 150:30

    Why will Photoshop CS4 not open after loading to new iMac from an external hard drive and I get this message: Licensing for this product has stopped working:error code: 150:30

    A Photoshop installation is tied to the machine it was installed on. Moving it to or from a hard drive breaks the licensing.
    The answer is easy: Reinstall CS4 from your disc. and apply all updates.
    Gene

Maybe you are looking for

  • Report Total but no Sub total.

    Hi, I have a report ( PL/SQL Function returning SQL Query). The query is complicated. If value of item :p1 is not null then it returns select col_a , col_b ... from table_a but if value of item :p1 is null then it returns select col_a , sum( col_b) ,

  • Cant add files and use itunes at the same time?

    I am totally confused as to why Itunes is Frozen when im adding files. I usually manually add my music to itunes myself. I figured why not take advantage and just have it do it for me. Now i cant play or pause the music as its doing this. The main pr

  • What is the preferred video file format for iMovie? About to purchase POS digital camera w ability to record HD Video.

    I am about to purchase a digital point and shoot camera with the ability to record HD video.   I plan on importing all pics and video to iPhoto and want to begin creating iMovies combining photo's and the video clips. It seems from the many posts tha

  • 3gs ios 5 activation issues

    Hello, I have a 3gs running IOS 5 on AT&T. I recently resotred the phone to factory defaults and I'm going through the IOS 5 setup. Activation fails as the phone is not recognizing the sim card. I have been unable activate via itunes or over the air.

  • Profiles on the Lumia 930

    Hello, Noob 930 questions.... I know there is Airplane mode.  But am I able to make custom profiles. On my N8 I take an existing profile and customize it - and save it. I would like to create a profile that is silent except for one caller.  That poss