-4

I am writing a small point and click adventure game for my friend, (and I need the practice) and I cannot figure out why I keep getting this error message. Basically what happens is when I run the program in Macromedia Flash it comes up with an output window saying:

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 1: Statement must appear within on handler
btn

The buttons will also not switch to the frame I have told it to go to. I don't have enough rep to post photos so I have posted two on Imgur.

This link here shows the code I have imputed: https://i.stack.imgur.com/ChFgg.jpg

This link here shows the error message that I get when I try to run my program: https://i.stack.imgur.com/w0ddk.jpg

I have tried finishing the frames that the code is directed too but have had no luck. I have also tried running the SDK "Check Syntax" and came up with no problems. I suspect that it is not incorrectly written code, but is just missing something. Any ideas?

1 Answers1

1

I believe that instead of the line

btnjump.onRelease = function() {

you should have the line

on (release) {
Ian Markowitz
  • 356
  • 1
  • 5