...I can't believe I'm posting this... Sorry for the relatively "simple" question, but here goes.
So, I've been using a static class called Maths that contains my own mathematical functions (such as significant figure rounding, angle and distance functions, etc.). I made it static for the same reasons AS3 makes it's Math class static; to avoid declaring a class instance to reference internal functions.
My troubles arise when I reference these static functions inside of another class. They work perfectly fine when called upon the stage:
//this is on the stage/Document class
import engine.utils.Maths;
trace(Maths.FOOBAR());
Yet do not work when called upon inside of my own classes:
//this is in a custom class
package engine
{
import engine.utils.Maths;
public class Shapes
{
public function Shapes():void
{
trace(Maths.FOOBAR());
}
};
};
And yet, oddly enough again, works perfectly fine when using FlashDevelop, but when making small demo projects in Flash itself, gives me the ever fruitful error message:
1061: Call to a possibly undefined method FOOBAR through a reference with static type Class.
I've really stumped myself here... No amount of Google could help me... I would appreciate any help you guys could offer, or alternative solutions suggested.
Again, thanks a lot Newgrounds community, you're always so helpful and friendly :)
Best regards,
Mike