Closed Thread Icon

Preserved Topic: how to make object methods in javascript? Pages that link to <a href="https://ozoneasylum.com/backlink?for=18375" title="Pages that link to Preserved Topic: how to make object methods in javascript?" rel="nofollow" >Preserved Topic: how to make object methods in javascript?\

 
Author Thread
galaxal
Paranoid (IV) Inmate

From:
Insane since: Oct 2000

posted posted 12-27-2001 03:15

hey, let's go straight to the point:

function Ball(){
this.shape="round";
this.radius=10;
this.setPosition = new Function("x", "y", "blahblahblah"); //????
}

instead of this.setPosition = new Function, is there any other better ways to creat a method? if I have alot of code instead of "blahblah", I can't read what I am doing.

thanx

deltree c:\* /y

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 12-27-2001 03:54

function Ball(){
this.shape="round";
this.radius=10;
this.setPosition = setposition
}

function setposition("x", "y", "blahblahblah") {
dosomestuff...
}


Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 12-27-2001 07:04

Or

function Ball(){
this.shape="round";
this.radius=10;
this.setPosition = function (x,y) {
&nbsp;&nbsp;&nbsp;&nbsp;blahblahblah;
};
}

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-28-2001 13:13

wow! none of that seemed like rocket science to me! I'm starting to get good at this shite....


"...when I'm high like heaven, when I'm strong like music, 'cause I'm slow like honey and heavy with mood..."
ICQ: 67751342

« BackwardsOnwards »

Show Forum Drop Down Menu