Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


Forum Topic: Error in the code?

(73 views • 7 replies)

This topic is 1 page long.

<< < > >>
None

ChuklesDaClown

Reply To Post Reply & Quote

Posted at: 5/13/08 04:15 PM

ChuklesDaClown NEUTRAL LEVEL 09

Sign-Up: 01/12/05

Posts: 142

I am trying to make text follow my cursor on my menu screen converted the text to a MC and am using this code
onClipEvent(enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
}
I get this error 1087: Syntax error: extra characters found after end of program, why does AS hate me?

The road to madness is just the scenic route to insanity


None

Rohedin

Reply To Post Reply & Quote

Posted at: 5/13/08 04:17 PM

Rohedin LIGHT LEVEL 14

Sign-Up: 02/19/06

Posts: 1,615

Make sure there's no spaces or new lines after the }


None

ChuklesDaClown

Reply To Post Reply & Quote

Posted at: 5/13/08 04:21 PM

ChuklesDaClown NEUTRAL LEVEL 09

Sign-Up: 01/12/05

Posts: 142

was a copy paste job but i Retyped it to make sure and still am geting the same error

The road to madness is just the scenic route to insanity


None

UnknownFury

Reply To Post Reply & Quote

Posted at: 5/13/08 04:26 PM

UnknownFury EVIL LEVEL 19

Sign-Up: 08/10/05

Posts: 4,595

Odd. Is there any other code anywhere else? Any you might of done by accident?

BBS Signature

None

ChuklesDaClown

Reply To Post Reply & Quote

Posted at: 5/13/08 04:35 PM

ChuklesDaClown NEUTRAL LEVEL 09

Sign-Up: 01/12/05

Posts: 142

Nope I am doing this to test it and see if it works it is a single frame singe layer with a movieclip and the code

The road to madness is just the scenic route to insanity


Resigned

knugen

Reply To Post Reply & Quote

Posted at: 5/13/08 04:40 PM

knugen LIGHT LEVEL 28

Sign-Up: 02/07/05

Posts: 3,007

Try creating a completely new AS2 document, make a new mc, and attach the code that you posted above to it.

They used to call me DreamworX..


None

salted-tator-tot

Reply To Post Reply & Quote

Posted at: 5/13/08 04:46 PM

salted-tator-tot FAB LEVEL 22

Sign-Up: 02/26/06

Posts: 2,863

Try putting this in the frame.

onEnterFrame=function(){
_root.object._x = _root._xmouse;
_root.object._y = _root._ymouse;
}

Dancing Pineapple Guy.

BBS Signature

None

ChuklesDaClown

Reply To Post Reply & Quote

Posted at: 5/13/08 05:27 PM

ChuklesDaClown NEUTRAL LEVEL 09

Sign-Up: 01/12/05

Posts: 142

Well I got it to work in AS2 but anyone have any idea on how to give it a elastic movment ie when it follows the mouse it has the look of it being attached by a rubber band.

The road to madness is just the scenic route to insanity


All times are Eastern Daylight Time (GMT -4) | Current Time: 09:51 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!