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

yozhik picture yozhik · Oct 3, 2011 · Viewed 34.4k times · Source

I want to pulish SWF file from .fla file. I have some scripts there, but when I pulished them - they don't work. I get error from compiler:

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

**Warning** The linkage identifier 'scrollableContent' was already assigned to the symbol 'pop_ups/__pop_up_other_elements/scrollableContent', and cannot be assigned to the symbol 'pop_ups/__pop_up_other_elements/scrollable_game_content', since linkage identifiers must be unique.

I google that error, but don't find any appropriate answer. I saw some information here, but it didn't help me. http://curtismorley.com/20​07/06/20/flash-cs3-flex-2-​as3-error-1046/

Please, tell anybody what problem produce this error and how can I fix it? Thanx!

Answer

phwd picture phwd · Oct 3, 2011

The official compiler errors list on Adobe's site. In this case

Error 1046

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{}

Check your .fla file to make sure you have all the links for assets properly. One simple case is that you have something on the stage with a name and one of your scripts has the same name. You cannot define it twice. Fix one of them.