This is what I got going on as far as declaring the class and the array:
Code:
function Toll(minX,minY,maxX,maxY)
{
this.minX=minX;
this.minY=minY;
this.maxX=maxX;
this.maxY=maxY;
this.tollSlope = ((minY - maxY)/(maxX-minX));
this.tollInter = minY - (tollSlope * maxX);
}
Toll.method('getMinX', function () {
return this.minX;
});
var myTolls = new Array()
myTolls[0] = new Toll(-81.20961, 28.45135, -81.20945, 28.45173);
and then later on in another function I try to call the getMinX function:
but when I run this in IE I get an error that says myTolls is not an object...
I am saying to myself of course myTolls is not an object. The value at element 0 in myTolls array is the object... what am i doing wrong?
(first time poster so if I am doing this wrong give me a heads up)