1

So I'm copying this tutorial from a website - making a Space Shooter game.

I'm at the 1+: Interactive Animation (Afterburner) Part but I can't seem to figure out where to add the last code for the last given code:

Return now to your stage and enter your original ActionScript from the previous tutorial. You need to edit the code in 'function 'playerMovement' to reflect the snippet below:

enter image description here

Source From:

http://markbennison.com/actionscript/as3-space-shooter/1plus-interactive-animation-afterburner/

Whenever I try to insert this code anywhere, it always says 1084: Syntax error: expecting right-brace after end of program

I can't figure out where I need to put the 'right brace after end of program"

Is it a nesting symbol problem or a code problem?

The whole point of the tutorial on the website is to make an interactive animation of spaceships fire depending on what arrow key you press.

Pleaseee helpppp - tips?

  • `playerMovement` function is missing the closing bracket ( `}` ) at the end of it. Always pay attention to brackets, as when you have a open bracket, you also need to have a closing bracket. – kaarto Jun 29 '18 at 04:57
  • Can I ask where I put it exactly, I'm sorry, Still freshly new – Animationix - HORROR ANIMATED Jun 29 '18 at 04:59
  • You already have `playerMovement` function from previous part, now you just need to modify it so that it looks like this new snippet from part 2. This new snippet just is missing the closing bracket of the function, but your old function should already have it. – kaarto Jun 29 '18 at 05:04
  • I'm sooo confused,, Where exactly do I need to put the closing bracket for the function, and wait, does the tutorial mean - edit the old playerMovement function from previous part? Sorry bad english – Animationix - HORROR ANIMATED Jun 29 '18 at 05:10
  • Yes, you only need to edit the old function that you already have there as you can't have two functions with same name. Closing bracket needs to be right after the last row of function content, the same way you already have those in other functions. – kaarto Jun 29 '18 at 05:13
  • THANKSS!!!! Its not going up or down, is it me or I havent done the code for the up and down movement? – Animationix - HORROR ANIMATED Jun 29 '18 at 07:24
  • Ah indeed, that's why the tutorial creator left the end bracket off. You should leave the up & down -functionalities as they were in the original function, and modify only the left & right -sections like he shows in the snippet. – kaarto Jun 29 '18 at 07:36

0 Answers0