design a foot ball game
hi all ,,,
this is the first time for me in this forum
i hope i will be useful for all
i'm asking here to build a foot ball game which like the captain tsubasa game in nintendo
if the play by the first player and the computer play with the second
i ask how the computer player(movie clip) may attack the first player(movie clip) (who has the ball) and when the computer player catch the first player , a new window will open or a new movie clip will open so i can choose to drible or shoot or pass
this is the suggestion code for the computer player (schnider) to attack me (tsubasa)
but i think there is a second code for this problem because with this code the speed is change and be slow and slow when schnider be near of tsubasa
this for tsubasa to change the position using the keyboard
on (keyPress "<Up>") {
if(this._y!=20){
this._y--;
}
}
on (keyPress "<Down>") {
if(this._y!=200){
this._y++;
}
}
on (keyPress "<Left>") {
if(this._x!=20){
this._x--;
}
}
on (keyPress "<Right>") {
if(this._x!=400){
this._x++;
}
}
and this for schnider
onClipEvent(enterFrame){
_y += (_root.ftTsubasa._y - _y)/50;
_x += (_root.ftTsubasa._x - _x)/50 ;
}
this post will be long so we will continue redesign the game to be good
and in the same time its good practice to deal with the action script in flash

