I want to do a men that jump when I press up…
so I do this code:
// definitions for the moving spaceship
on (keyPress "<left>")
{
if ( ( this._x > 0))
{
this._x = this._x - 20;
}
}
on (keyPress "<right>")
{
if ( ( this._x < 570))
{
this._x = this._x + 20;
}
}
on (keyPress "<up>")
{
if ( ( this._y > 175))
{
this._y = this._y - 20;
}
}
how can I do that when I press up he do What I say to him:
on (keyPress "<up>")
{
if ( ( this._y > 175))
{
this._y = this._y - 20;
}
}
and after he do this he retun to y=400…
and the X stay in is place…
thanks
pls replay in easy english that I can understand you…