Codes: Music: Jellow Glow Made By: zlarke ____________________________________ VCam Download: http://www.mediafire.com/download.php?zdgyzwmiixw ____________________________________ FLA file download: http://www.mediafire.com/download.php?ydfzjzfdgqm ____________________________________ Copyright by: Flash8Games ActionScript Codes: Codes for the character: onClipEvent (load) { grav = 2; speed = 8; jumpHeight = 9; setspeed = speed; ex = 5; } onClipEvent (enterFrame) { action = true; grav++; _y += grav; while (_root.ground.hitTest(_x, _y, true)) { _y--; grav = 0; } if (Key.isDown(68)) { _x += speed; if (_root.ground.hitTest(_x, _y+3, true)) { } else { } } else if (Key.isDown(65)) { _x -= speed; if (_root.ground.hitTest(_x, _y+3, true)) { } else { } } else { if (_root.ground.hitTest(_x, _y+3, true) && !Key.isDown(79) && !Key.isDown(73)) { } } if (Key.isDown(79) && !Key.isDown(87) && !Key.isDown(65) && !Key.isDown(68) && !Key.isDown(73)) { } if (Key.isDown(73) && !Key.isDown(87) && !Key.isDown(65) && !Key.isDown(68) && !Key.isDown(79)) { } if (Key.isDown(87) && _root.ground.hitTest(_x, _y+3, true)) { grav = -jumpHeight; _y -= 4; } if (_root.ground.hitTest(_x+(_width/2)+ex, _y-(_height/2), true) || _root.ground.hitTest(_x+(_width/2)+ex, _y-(_height/6), true) || _root.ground.hitTest(_x+(_width/2)+ex, _y-_height, true)) { _x -= speed; } if (_root.ground.hitTest(_x-(_width/2)-ex, _y-(_height/2), true) || _root.ground.hitTest(_x-(_width/2)-ex, _y-(_height/6), true) || _root.ground.hitTest(_x-(_width/2)-ex, _y-_height, true)) { _x += speed; } if (_root.ground.hitTest(_x, _y-_height-15, true)) { grav = 1; } } ____________________________________ Codes for the VCam: onClipEvent (enterFrame) { _y += (_root.char._y-_y)/4; _x += (_root.char._x-_x)/4; } ____________________________________ Symbol ground instance: ground Symbol character instance: char ____________________________________ - Flash8Games code pour embarquer la vidéo : >>> http://www.youtube.com/embed/icWMh9ZpYVQ <<< |