Voilà j'ai une boule et un bullet(balle d'une arme)
j'ai tout un code mais le bullet ne monte pas à l'endroit où je tire
Je ne trouve pas mon erreur
je joins mon fichier fla
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
16
17
18
19
20
21
22
23
24
25 xmax=cercle._x+100 xmin=cercle._x-100 cercle.currentItem=0; cercle.onEnterFrame=function(){ if(Key.isDown(Key.RIGHT) && this._x<xmax) { this._x+=10 } if(Key.isDown(Key.LEFT) && this._x>xmin) { this._x-=10 } if(Key.isDown(Key.SPACE)) { _root.attachMovie("bullet","bullet"+this.currentItem,50+this.currentItem); _root["bullet"+this.currentItem]._x=this._x+5; _root["bullet"+this.currentItem]._y=this._y-5; _root["bullet"+this.currentItem].onEnterFrame=function() { this.currentItem++; } } }
Partager