Richie Vos

More from me

July 22, 2008

TypeError: Error #1115: ClassName.as$123::Cabbage is not a constructor.

Had this happen today, I believe the cause for this message is the specified class’s definition has not been loaded.

Example where this can happen is you have code like:

package good {
    public class Muppet {
        private static var ball:Ball = new Ball();
    }
}

class Ball {}

At the time of the running of the ball = new Ball(); code, the class definition of Ball has not yet been evaluated.

Solution is to move Ball into its own file.

blog comments powered by Disqus