Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

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


Forum Topic: Where do you declare functions?

(53 views • 2 replies)

This topic is 1 page long.

<< < > >>
None

helxliankid

Reply To Post Reply & Quote

Posted at: 4/12/08 08:34 PM

helxliankid LIGHT LEVEL 07

Sign-Up: 07/27/05

Posts: 34

I've read a couple tutorials about functions, but I am wondering, does it matter where you declare the function? Is it in the keyframe, movieclip, or button?


None

Snoman1616

Reply To Post Reply & Quote

Posted at: 4/12/08 08:46 PM

Snoman1616 FAB LEVEL 12

Sign-Up: 09/27/07

Posts: 123

it does matter because if you the frame to (goto and play)(3) then it wont do it but if you set a button to do the same function it will do it if you put the AS in right

still paying retail for games??
if you want them for free visit this site and sign up!
Click Here

BBS Signature

None

knugen

Reply To Post Reply & Quote

Posted at: 4/12/08 08:52 PM

knugen LIGHT LEVEL 29

Sign-Up: 02/07/05

Posts: 3,107

In Actionscript (at least 2.0), unlike C, you only need to define the function, not declaring.

And yes, it does matter where you define it. No matter where you put the definition the function can be accessed, but on the main timeline is most often the best choice though.

They used to call me DreamworX..

BBS Signature

All times are Eastern Daylight Time (GMT -4) | Current Time: 12:52 AM

<< 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!