Domaine : tutoriel
Tag : flash 8 tuto
Aller à l'accueil


TAGS SPECIALISES :

macromedia flash 8 tuto
webdesign tutoriaux
tuto jeux flash
tuto flash mx
camera raw cs4
formation flash 8
tuto site en flash
faire un site en flash tuto
tuto site flash
site flash tuto
créer un site en flash tuto
site en flash tuto
tuto flash bouton
tuto bouton flash
tuto portfolio flash
flash tuto
tuto flash 8
tuto macromedia flash 8
tuto jeu flash
cs4 cs5
retouche photo tutorial
créer un flash
tuto flash diaporama
tuto diaporama flash
tutoriels flash cs3
diaporama flash tuto
banniere flash tuto
animation flash cs3
tuto slideshow flash
flash cs5
tuto flash banniere
cs5 flash
photo cs5
tuto bannière flash
bridge cs4
tutoriels flash







ActionScript Codes:

Character:

onClipEvent (load) {
var ground:MovieClip = _root.ground;
var grav:Number = 0;
var gravity:Number = 2;
var speed:Number = 7;
var maxJump:Number = -12;
var touchingGround:Boolean = false;
}
onClipEvent (enterFrame) {
_y += grav;
grav += gravity;
while (ground.hitTest(_x, _y, true)) {
_y -= gravity;
grav = 0;
}
if (ground.hitTest(_x, _y+5, true)) {
touchingGround = true;
} else {
touchingGround = false;
}
if (Key.isDown(Key.RIGHT)) {
_x += speed;
}
if (Key.isDown(Key.LEFT)) {
_x -= speed;
}
if (Key.isDown(Key.UP) && touchingGround) {
grav = maxJump;
}
if (ground.hitTest(_x+(_width/2), _y-(_height/2), true)) {
_x -= speed;
}
if (ground.hitTest(_x-(_width/2), _y-(_height/2), true)) {
_x += speed;
}
if (ground.hitTest(_x, _y-(height), true)) {
grav = 3;
}
}
_________________________
- Flash8Games

code pour embarquer la vidéo : >>>    http://www.youtube.com/embed/BCPwTIsSVSw    <<<






TAGS GENERAUX :

  tutoriels cs5  tuto xcode  tutoriel piano  tuto photo  tuto flash  tutoriel flash cs5  tuto piano  cs5 tutoriels  joomla tuto  flash cs5 tuto