FORUMS: list search recent posts

Adobe Flash, Syntax error 1071. PLEASE PLEASE, ANY ASSISTANCE!!!

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Adam Sowards
Adobe Flash, Syntax error 1071. PLEASE PLEASE, ANY ASSISTANCE!!!
on Dec 14, 2011 at 3:47:27 am

I am building a flash website in action script 3.0, off of THIS tutorial video...






At exactly 2 minutes in he starts explaining the action script for line 13, his works perfectly in the preview.
Mine however starts flipping out and flashing the buttons. and i get a error message.

Scene1, Layer 'actions', Frame 40, Line 13 1071: Syntax error: expected a definition keyword (such as function) after attribute Function, not gotoHome.

I am taking a Multimedia productions class and the so called "teacher" will be out until this Final website is due. Please Help....

Here's my actionscripting... stop is line 1 and Function is line 13 (the error line)

stop();

btn1.gotoAndStop(2);
btn2.gotoAndStop(1);
btn3.gotoAndStop(1);
btn4.gotoAndStop(1);

btn1.addEventListener(MouseEvent.CLICK, gotoHome);
btn2.addEventListener(MouseEvent.CLICK, gotoAbout);
btn3.addEventListener(MouseEvent.CLICK, gotoGallery);
btn4.addEventListener(MouseEvent.CLICK, gotoVideo);

Function gotoHome(event:MouseEvent):Void
{
gotoAndStop("home");
}
Function gotoAbout(event:MouseEvent):Void
{
gotoAndStop("about");
}
Function gotoGallery(event:MouseEvent):Void
{
gotoAndStop("gallery");
}
Function gotoVideo(event:MouseEvent):Void
{
gotoAndStop("video");
}


included is the link to my file
3404_website.fla.zip


Return to posts index

Pieter Helsen
Re: Adobe Flash, Syntax error 1071. PLEASE PLEASE, ANY ASSISTANCE!!!
on Dec 14, 2011 at 6:26:35 am

Actionscript is case-sensitive, so the word 'function' should be written entirely in lowercase.

Kind regards,
Pieter

General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.


Return to posts index

Adam Sowards
Re: Adobe Flash, Syntax error 1071. PLEASE PLEASE, ANY ASSISTANCE!!!
on Dec 14, 2011 at 9:30:58 pm

i am using action script 3.0, sorry about that.
I replaced "Function" with "function" and "Void" with "void" and it worked.
Even though it was being all crappy before. Thank you so much for your help.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]