Flash newbie seeks advice debugging simple button script

topic posted Mon, August 23, 2004 - 10:05 AM by  smoke
Share/Save/Bookmark
Advertisement
I'm building my first flash file and I simply want to make a button that takes the user from Scene 1 to Scene 2. I followed the help instructions and got the script that is suppose to make it work.

This is what I entered into the action panel:

//This script takes the user to Scene 2 when goScene_btn is released
this.EnterExhibit_btn.onRelease = function (){
gotoAndStop("Scene 2", 1);
};

I use the check script function in the action panel and got a "script has no errors" confirmation.

However when I run the test movie I get this in the output panel:

**Error** Scene=Scene 1, layer=Actions, frame=1:Line 4: Statement must appear within on handler
EnterExhibit_btn.onRelease = function (){

Total ActionScript Errors: 1 Reported Errors: 1


Questions:

1.What am I doing wrong?

2.What does "Statement must appear within on handler" mean?


The button shows up as a button in the property inspector. It was created by the "Convert to Symbol" function and was never any other kind of symbol other than a button.
posted by:
smoke
Seattle
Advertisement
Advertisement

Recent topics in "flashdesign"

Topic Author Replies Last Post
Flash for Zsu Zsu offlineJelly 0 December 26, 2008
Simple Button help Brinnin 0 August 19, 2008
Universal Symbiosis Records - Flash Website Entheogenic 0 June 4, 2008
Book suggestions? Jamaican Steve 1 November 21, 2007