Войти
  • 182634Просмотров
  • 1 десятилетие назадОпубликованоToko

How to make a game in flash.

this is a tutorial on how to make a flash game in flash 8, cs4, cs5, cs5.5. It will show you how to animate your character while it moves. Thanks for watching, comment rate and subscribe for more :) Watch in HQ. this is the code for the character. onClipEvent (load) { var ground:MovieClip = ; var grav:Number = 0; var gravity:Number = 2; var speed:Number = 7; var maxJump:Number = -12; var touchingGround:Boolean = false; scale = _xscale; } onClipEvent (enterFrame) { _y += grav; grav += gravity; while ( (_x, _y, true)) { _y -= gravity; grav = 0; } if ( (_x, _y+5, true)) { touchingGround = true; } else { touchingGround = false; } if ( ( )) { _xscale = +scale; _x += speed; (2); } if ( ( )) { _xscale = -scale; _x -= speed; (2); } if ( ( ) && touchingGround) { grav = maxJump; (3); } if ( ( )){ (4); } if ( (_x+(_width/2), _y-(_height/2), true)) { _x -= speed; } if ( (_x-(_width/2), _y-(_height/2), true)) { _x += speed; } if ( (_x, _y-(height), true)) { grav = 3; } } onClipEvent (keyUp) { (1); }