
-----------------------------------
camilito
Tue Dec 20, 2005 5:46 pm

help with game in flash
-----------------------------------
i need help with my game please. um...well I'm doing this game thats like a monkey jumping game kind of thing. the game is supposed to do, that when it reaches the end of the screen it'll go to the next level, but my game fails to do that and I've tried many things like adding a code layer and doing several hitTest codes. if anyone could help me i'd be very appreciative. i will post the code of my game and if anyone could fix it up I will praise the floor u walk on. i will provide pictures of what it looks like as well just so that u have reference, i wont go too indepth of my game, but ill give you enough information so you know what the basic concept is...

ps:  im a beginner still so please any code that you add, keep it simple. (im still in gr 10)



THIS IS INSIDE THE MONKEY IN FRAME TWO OF LAYER BACKGROUND:

onClipEvent (load) {
// when the character is loaded
var score = 0;
speed = 0;
// set speed to zero
maxmove = 10;
//set max movement to 10
jumping = true;
// allow jumping
jump = 0;
// set jump to 0 so that character falls to ground when frame loads
}
onClipEvent (enterFrame) {
// when character enters frame set the following
if (_root.dead) {
this.gotoAndStop("fraDead");
// go to frame "dead"
} else {
speed *= .9;
if (speed>0) {
//when speed is greater than 0 set direction to right
dir = "right";
} else if (speed-maxmove) {
speed--;
//makes the character move left
}
this.gotoAndStop("fraRun");
// display running frame
this.gotoAndPlay("fraArm1");
//display arm fling frame
this.gotoAndPlay("FraArm2");
//display arm fling frame
this.gotoAndPlay("fraLeg1");
//display leg fling frame
this.gotoAndPlay("fraLeg2");
this._xscale = -50;
// flip frame horizontally
} else if (Key.isDown(Key.RIGHT)) {
//when right key is pressed
if (speed