all groups > flash (macromedia) > august 2007 >
You're in the

flash (macromedia)

group:

What does this mean? "1087: Syntax error: extra characters found after end of program."?


What does this mean? "1087: Syntax error: extra characters found after end of program."? sirantonycartwright
8/26/2007 7:44:03 PM
flash (macromedia):
Hiya, please have a look at my .fla, you can get it from:

http://antonycartwright.somee.com/pleasefixme.fla

Whats wrong with it? Ive been messing about with it for about 2 hours and i
still cant solve it. Does anyone know what to do?

Ant...
Re: What does this mean? "1087: Syntax error: extra characters found after end of program."? dzedward
8/26/2007 8:31:03 PM
what exactly are you trying to do? first, there is no getURL in AS3, it has
been changed to navigateToURL.. second, on(release) is placed on button
instances, and it no longer excepted in AS3, you must give the instance you
want to control an instance name, and use that to control it with actionscript.
it appears you are trying to load into a frame..?.. however, i'm not sure.
if you are, then this is what you need... and is assuming you give your button
an instance name of, my_btn

function loadPageFrame(event:MouseEvent):void {
var myURL:URLRequest = new URLRequest("http://www.youpage.com/");
navigateToURL(myURL,"yourFrameName");
}
my_btn.addEventListener(MouseEvent.CLICK, loadPageFrame);
Re: What does this mean? "1087: Syntax error: extra characters found after end of program."? sirantonycartwright
8/26/2007 9:10:21 PM
Hiya, thanks for your quick reply and your helpful code up there.
Ive named the button btnClick and altered the code likewise.
Ive also updated the file on my webspace.

Now it says:
1061: Call to a possibly undefined method addEventListener through a reference
with static type Class.

I dont understand any of this! Ive never used flash before!
Re: What does this mean? "1087: Syntax error: extra characters found after end of program."? sirantonycartwright
8/26/2007 9:11:58 PM
Re: What does this mean? "1087: Syntax error: extra characters found after end of program."? dzedward
8/26/2007 9:29:23 PM
you are applying this before the button is on stage. place this above where
btnClick appears on stage. if you are just trying to open a new page.. then
change
navigateToURL(myURL, "yourFrameName");
to
navigateToURL(myURL, "_self"); //or "_blank" blank opens new window self
opens in same window
Re: What does this mean? "1087: Syntax error: extra characters found after end of program."? sirantonycartwright
8/26/2007 9:48:47 PM
Put what above where btnClick appears, the code?
The button appears straight away doesnt it? It is on the first frame.
I dont really understand what you mean!

Re: What does this mean? "1087: Syntax error: extra characters found after end of program."? sirantonycartwright
8/26/2007 9:49:58 PM
Re: What does this mean? "1087: Syntax error: extra characters found after end of program."? dzedward
8/26/2007 9:57:18 PM
you need to put this on frame 1, and make sure you give your button an the
instance name... when you click the button on stage, look down at the
properties inspector, bottom left, it will say <instance name>. click there and
type the name you gave in the script to add the listener to.
Re: What does this mean? "1087: Syntax error: extra characters found after end of program."? sirantonycartwright
8/26/2007 10:25:13 PM
Ha ha, ive tried all of the names, etc, and i still get an error.
Never mind - Its driving me mad!

This is the error i get now:
1046: Type was not found or was not a compile-time constant: btnClick.

Ill have another go tomorrow, its 11:30 here in the UK!

Thanks for your help, Ant...
Re: What does this mean? "1087: Syntax error: extra characters found after end of program."? dzedward
8/26/2007 10:39:01 PM
Re: What does this mean? "1087: Syntax error: extra characters found after end of program."? Montemedia
9/19/2007 9:48:59 PM
What does this mean? "1087: Syntax error: extra characters found after end of
program."?

I am just trying to create a simple invisible button over an instance of a
movie clip and I keep getting that annoying 1087 syntax error message.

There is no 1087 error code listed - the list starts at 1093 - my luck!

Here is my silly script. You tell me what's wrong with it - I copied it
straight from a text and scripted it a couple other ways, as well:
on (rollOver) {
SendEmail.play;
}
on (rollOut) {
SendEmail.stop;
}
/// what's wrong with this script? where are the extra characters the error
message is refering to in line 1 of the code?
AddThis Social Bookmark Button