05-03-2008, 04:24 PM
|
The secret of NIMH
|
|
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
|
|
pass functions/variables/objects by reference
I know about .link() for objects but what about functions?
This is what I'm trying:
Bounce = new TStaticVar("Bounce");
Bounce.easeInOut = function(a,b,c,d) {
return a+b+c+d;
};
function Tween(easefunc,prop,a,b,c,d) {
prop = easefunc(a,b,c,d);
}
Tween(Bounce.easeInOut.link(), this.x.link(), 1,2,3,4);
(Essentially, it's just psuedocode)
But I'm getting all sorts of odd behaviour.
I've tried joining from classes, I've tried function objects, I've tried seperate named functions for everything, no workie.
Any ideas? |
__________________
|
|
|