Skip to main content
Participating Frequently
November 19, 2009
Question

1046: Type was not found or was not a compile-time constant

  • November 19, 2009
  • 1 reply
  • 316 views

Hello,

Can someone please explain what the error is saying. I don't understand compile time constant. This way if I receive this error again I will understand what it means.

This topic has been closed for replies.

1 reply

Participant
November 19, 2009

According to the adobe livedocs for AS3:

1046Type was not found or was not a compile-time constant: %s.The class used as a type declaration is either unknown or is an expression that could have different values at run time.           Check that you are importing the correct class and that its package location           has not changed. Also, check that the package that contains the code (not the           imported class) is defined correctly (for example, make sure to use proper           ActionScript 3.0 package syntax, and not ActionScript 2.0 syntax).

The error can also occur if the class being referenced is not defined in a namespace that is in use or is not defined as public:

public class Foo{}

Hope it helps.