Forgive me if there is an extremely simple answer to this question.
I am currently updating a series of .fla files that someone else created. Within one of the symbols is the following code: this.insertMovieClip("symbolName","objectReferenceName",5);
I understand what the code is doing, or rather what it would do normally. It would find a symbol named symbolName in the library, and create an instance of it named objectReferenceName inside this MovieClip.
The problem is that I have searched the library, and I can’t find anything named symbolName. It doesn’t exist. But somehow, there is a movie clip being called at runtime – the code works. What am I missing here?
The symbol names in the library actually have no effect at run-time—they are simply labels. The identifier that gets used at run-time is set in the Linkage properties for a symbol. You can see this by looking under the AS Linkage column in the library, or right-clicking a symbol and clicking Properties.
In AS2, you assign an identifier to a symbol by checking the “Export for ActionScript” box in the Properties dialog. You can then create an instance of that symbol from ActionScript like this:
This is probably what your
insertMovieClipfunction is doing.