Type was not found or was not a compile-time constant 1046
Asked Answered
R

2

6

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!

Router answered 2/10, 2011 at 23:57 Comment(2)
What Type was not found or was not a compile-time constant? Feels like you are missing an identifier. This does not sound like the entire error message.Arlynearlynne
Your mentioned page url seems wrong. the corrected one is curtismorley.com/2007/06/20/flash-cs3-flex-2-as3-error-1046Frons
A
2

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.

Arlynearlynne answered 3/10, 2011 at 0:20 Comment(2)
Symbol 'dlg_startScreen' 1046: Type was not found or was not a compile-time constant: game_con. After delete “dlg_startScreen” Symbol 'game_com' 1046: Type was not found or was not a compile-time constant: scrollableContent. Symbol 'game_com' 1046: Type was not found or was not a compile-time constant: scroll.Router
I have such compile errors. Say, please, where I have to check for links to assets?Router
R
2

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.

Router answered 3/10, 2011 at 14:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.