Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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!

like image 347
yozhik Avatar asked Oct 02 '11 23:10

yozhik


2 Answers

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.

like image 89
phwd Avatar answered Oct 17 '22 14:10

phwd


So, I finded out reason, why that error was. Here is solution:

If, for example, you have 2 MovieClips: movie1_mc, class linkage: "movie1" movie2_mc, class linkage: "movie2"

And if movie1_mc is a child of movie2_mc, and also have its instance name same that its class linkage - error 1046 occurs.

So, the rule is: If one file with class linkage is child of some other class, than its instance name must be different than its class linkage.

like image 31
yozhik Avatar answered Oct 17 '22 16:10

yozhik