I have a test class:
package {
public class Test {
public function Test() {
}
public function testMe():String {
return 'Tested';
}
}
}
Which I include thussly:
import Test;
But when I call
trace(Test.testMe());
It says:
“1061: Call to a possibly undefined method testMe through a reference with static type Class.”
It works if I do:
var asdf:Test = new Test();
trace (asdf.testMe());
I don’t understand why I have to instantiate the class for it to work? I have a tween library called TweenLite which I don’t have to instantiate to use, and as far as I can tell the class syntax is the same.
Any help would be appreciated.