# Shooting Actionscript

**URL:** <https://forum.kirupa.com/t/shooting-actionscript/173076>\
**Category:** flash\
**Created:** [December 20, 2005, 11:05pm UTC](https://forum.kirupa.com/t/shooting-actionscript/173076 "2005-12-20T23:05:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ragnarok](https://avatars.discourse-cdn.com/v4/letter/r/4af34b/32.png) [@Ragnarok](https://forum.kirupa.com/u/Ragnarok)\
**Post date:** [December 20, 2005, 11:05pm UTC](https://forum.kirupa.com/t/shooting-actionscript/173076/1 "2005-12-20T23:05:13Z")

</div>

This is my actionscript, it says that line 8 needs to have a ; but i can’t figure out where to put it, my code is supposed is to play the set frames if my character is facing the oppisite direction.

onClipEvent (enterFrame) {  
if (Key.isDown(Key.SPACE)) {  
if (\_xscale = 100) {  
this.\_x = \_root.BlackMageWalk.\_x+18;  
this.\_y = \_root.BlackMageWalk.\_y+8;  
gotoAndPlay(2);  
}  
else (\_xscale = -100){  
this.\_x = \_root.BlackMageWalk.\_x-18;  
this.\_y = \_root.BlackMageWalk.\_y+8;  
gotoAndPlay(18);  
}  
}  
if (\_root.Lightning, hitTest(\_root.Enemy)) {  
\_root.EnemySound.play();  
}  
if (Key.isDown(Key.SPACE)) {  
\_root.i += 1;  
duplicateMovieClip(\_root.Lightning, “Lightning”+i, i);  
}  
if (this != \_level0.Lightning) {  
if (\_root.fire == 1) {  
this.\_y -= 5;  
this.\_visible = 1;  
}  
if (this.\_y\<0) {  
this.removeMovieClip();  
}  
}  
}
