A simple show of how 15 lines of coding can make a simple game. The coding included was velocity variables and a limit to the variables so the object wont go off the play area.
Due to comments here is the code i used?
class ty extends MovieClip
{
var velocity;
function onLoad()
{
velocity = 10;
}
function onEnterFrame()
{
if( Key.isDown(Key.RIGHT) )
{
_x = _x + velocity;
}
if( Key.isDown(Key.LEFT) )
{
_x = _x ? velocity;
}
if( Key.isDown(Key.UP) )
{
_y = _y ? velocity;
}
if( Key.isDown(Key.DOWN) )
{
_y = _y + velocity;
}
}
}
Please donate and help me to make more games thanks everyone.
Contact me if you have any problems or want to learn how to do this :)