Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-11-2003, 02:11 PM   #1
sandman9
Senior Member
 
Join Date: Oct 2002
Location: Canada
Posts: 434
Default Functions&Objects

Hello

I'm trying to memorize a list of built-in functions and a list of built-in objects. Although I want to understand why eval, escape, etc are built in functions and why colour, button, etc are built in objects. Like is there something that can help me to distinguish in my mind what is a functin and what is a object (built in of coarse). Also things like boolean and string will appear as both a built in function and object. My only reference has been looking at something like this:

Quote:

function scoreTally (userName, score) {
score.display = userName;
score.display = score;
}

Looking at this I figure what ever goes in the first line above is considered a function and the "score.display" would be the object. I don't know if this is correct. Can anyone help my confused mind?

Sandman9
sandman9 is offline   Reply With Quote
Old 10-11-2003, 06:45 PM   #2
sandman9
Senior Member
 
Join Date: Oct 2002
Location: Canada
Posts: 434
Default

Basically I guess my question is:

How can my mind look at date, array, eval, and escape and say "oh, Date and Array are built-in Objects and Eval and Escape are built-in Functions" ......... How can I know this?

Sandman9
sandman9 is offline   Reply With Quote
Old 10-12-2003, 06:26 AM   #3
snapple
member
 
snapple's Avatar
 
Join Date: Feb 2002
Location: London
Posts: 2,442
Default

sandman,

Well this is going to sound like an annoying answer, built in objects are ones you don't have to instantiate, you access the object directly. Built in objects are made by Flash.

Obviously, built in functions are exactly the same, in that we dont have create them, for example, you know what the

ActionScript Code:
gotoAndPlay();

function does - you know that you can always use that, because you know it is a built in function and will always be available.

Its built it - its very easy to tell built in objects apart from user defined ones - cos you have to make the ones that aren't built it, simple !

You could also change your settings in Flash so that whenever you use a built object or function it appears bright pink - then you'd know.

Regards, snapple

Last edited by snapple; 10-12-2003 at 06:29 AM.
snapple is offline   Reply With Quote
Old 10-12-2003, 04:02 PM   #4
sandman9
Senior Member
 
Join Date: Oct 2002
Location: Canada
Posts: 434
Default

Hey Snapple

Thanks for your reply but I think you missed the question. I am asking about how to diffferntiat between Objects and Functions. Please read above to find out what exactly .

Thanks again for the reply
Sandman9
sandman9 is offline   Reply With Quote
Old 10-12-2003, 04:48 PM   #5
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

you know by remembering
__________________
(6)
senocular is offline   Reply With Quote
Old 10-12-2003, 05:32 PM   #6
snapple
member
 
snapple's Avatar
 
Join Date: Feb 2002
Location: London
Posts: 2,442
Default

Yeah, i think senocular's technnique might work well.

I mean, i probably missed the question cos its a bit of an odd one. Get a book and a cup of coffee & tolberone (my combo).

Functions are functions - they do things, objects contain data. Methods are functions applied to objects.

Theres no magical way - an object is an object - i mean you know that the date object is not a method or a function - because its an object.

Functions accept parameters too when they are instiated.

snapple
snapple is offline   Reply With Quote
Old 10-12-2003, 06:53 PM   #7
jubei
Chunky Samurai
 
jubei's Avatar
 
Join Date: Jun 2002
Location: Adelaide, Australia
Posts: 469
Send a message via ICQ to jubei Send a message via AIM to jubei Send a message via MSN to jubei Send a message via Yahoo to jubei
Default

I like your suggestion that functions -do- things wheras objects -are- things.. things that contain data. It makes it sound like a verb versus a noun
jubei is offline   Reply With Quote
Old 10-12-2003, 06:59 PM   #8
sandman9
Senior Member
 
Join Date: Oct 2002
Location: Canada
Posts: 434
Default

ya this is what I was going to do. I did not know if there was a better way than just that ...... i guess i know now

thanks guys
Sandman9
sandman9 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:55 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.