Still cant understand how:Well, lookin at that, this is where I think OOP may start to come in handy
OOP would help me.Code:Circle.prototype.area = function() { return Math.PI*this.radius*this.radius; }; function Circle(radius) { this.radius = radius; } var myCircle = new Circle(5); var myCircleArea = myCircle.area(); trace(myCircle.area());




Reply With Quote