A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: keep getting syntax errors

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    1

    keep getting syntax errors

    i'm new to flash.
    i'm trying to make a simple flash movie in cs4.

    scene 1 > click a button > gotoandplay scene 3

    thats all.

    my script looks like this:

    stop();
    on (release) {
    gotoAndplay("Scene 3",1);
    }

    i keep getting the following error:
    1087: Syntax error: extra characters found after end of program.

    and is referring to:
    on (release) {

    i don't know why this is happening.
    can someone help me?

  2. #2
    Senior Member Steven FN's Avatar
    Join Date
    Mar 2010
    Location
    CA, USA
    Posts
    276
    It looks like your code is in a frame on the timeline, the onRelease should be added to the button itself.

    The rest of the syntax looks right. Not sure if it matters, but if case-sensitive it should read gotoAndPlay();

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center