Error #1046: Type was not found or was not a compile-time constant: Name.
One reason you will get this error is if you have an object on the stage with the same name as an object in your library. So if you are trying to dynamically add a movieClip from your library that has a Class name (see image below) that is the same as the name of an instance on the stage it will give you this error. What happens when you add a class name in the library is that Flash (in this case) will create a class around that object. When you have an instance on the stage that has this same name Flash doesn't know how to handle it because the Class was not properly instantiated.
AS3 Error 1046 Fix 1:
Remove the instance from the stage, change the name of the instance, or remove the Class linkage in your library.
AS3 Error 1046 Fix 2:
Import, Import, Import. Another common reason that you will get this error is because you have not imported everything you are including in your movieClip. For example if you are using textFields inside your movieClip you need to include the following line of code:
By importing the TextField object the compiler now knows what to do with that textField inside your movieClip. This will eliminate another version of this error - '1046: Type was not found or was not a compile-time constant: TextField'.
AS3 Error 1046 Fix 3:
This error will also show up if you are trying to instantiate a library object with an instance name that is the same as the AS Linkage in your library. In other words, you can't call it the same name. Look at the image for the Linkage name and then take a look at the code examples. The red code below shows that the same name is being used.
var TTA:TTA = new TTA();
var thirdAlternative:TTA = new TTA();
And now you know three ways to resolve ActionScript Error #1046: Type was not found or was not a compile-time constant:
As always Happy Flashing!