I have a Segment class and instances of the segment class. Public functions called from the class itself fail, where functions called from instances work. Example:
import Scripts.Segment; // my class
import flash.geom.Point;
var p1:Point = new Point(1, 3);
var p2:Point = new Point(7, 4);
var p3:Point = new Point(4, 5);
var p4:Point = new Point(5, 1);
var mySegment1:Segment = new Segment(p1, p2); // generate two instances
var mySegment2:Segment = new Segment(p3, p4);
var p5:Point = mySegment1.intercept(mySegment1, mySegment2); // works
var p6:Point = Segment.intercept(mySegment1, mySegment2); // gives me an error
Error looks like this, by the way:
1061: Call to a possibly undefined method intercept through a reference with static type Class.
How do I access the methods without using an instance? Like the way one might use Point.distance(p1, p2)?