Skip to main content
Aug 11, 2006 5:41 PM UTC
Answered

button symbol onRelease not recognized in AS

Greetings, all. I apologize in advance if this is the lamest question ever posted here, but I'm having a terrible time with it. Here's the deal: I have a Flash presentation document (slides). The first set of slides are an index to a video that is displayed later.

In the index slides, I have a series of gotoSlide and gotoAndStop operations launched from button symbols. I'd like to put the code on the timeline (instead of on the button symbol objects). So, the first frame of a slide has the following code, where L1-1_button is one instance of a button symbol:

L1-1_btn.onRelease = function() {
gotoAndStop(2);
}

When I launch the movie, the output window displays the following error:

**Error** Screen=lecture1, layer=actions, frame=1:Line 3: Syntax error.
L1-1_btn.onRelease = function() {

Why? What's the syntax error? Any help is greatily appreciated. This is making me crazy!
This topic is closed to new replies. Start a new post to keep the conversation going.
Josh_Pratt1Correct answer
Inspiring
Aug 11, 2006 6:02 PM UTC
I could be wrong, but I didn't think that the character "-" is allowed in instance names. Maybe try ditching the dash on "L1-1_btn".

2 replies

Josh_Pratt1Correct answer
Inspiring
Aug 11, 2006 6:02 PM UTC
I could be wrong, but I didn't think that the character "-" is allowed in instance names. Maybe try ditching the dash on "L1-1_btn".
Translate
Aug 11, 2006 7:01 PM UTC
Oh, my. Now I feel *really* lame, but also grateful for your help!
Translate