Bonjour,

je suis débutante en actionScript et je voudrais réaliser une balle qui rebondisse sur les quatre cotés d'un document de 550x400px. Mais ma balle ne rebondit que sur trois cotés et pas exactement comme je veux :


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
onClipEvent(enterFrame){
	if ((this._x<500)and(this._y>100)){
		this._x+=5;
		this._y-=5;	}
	else if ((this._x>=270)and(this._y<=100) and(this.y>=-3)){
		this._x-=7;
		this._y-=7; }
	else if ((this._x>0)and(this._y<100)){
		this._x-=15;
		this._y+=10; }
	else if ((this._x<200)and(this._y<400)){
		this._x+=25;
		this._y+=25; 
		}
}