vscode-as3mxml icon indicating copy to clipboard operation
vscode-as3mxml copied to clipboard

Configuration option to define Adobe Animate library symbols with generated linkage

Open bls1999 opened this issue 5 years ago • 7 comments

I have graphics with AS3 linkage that don't have any corresponding AS3 files (the linkage is assigned in the .fla project and the files are generated automatically when the SWF is compiled). As a result, the program throws a problem to the problems list with this message:

Type was not found or was not a compile-time constant: NameOfGraphic.(1046)

Is there a way to specify which project files are generated automatically by flash in order to mute these errors? Maybe in the config file?

bls1999 avatar Mar 06 '20 14:03 bls1999

You will need to create the appropriate .as file for each of your library symbols with AS3 linkage. There's no way for VSCode to know that something is automatically generated by Animate, so you need to do it manually instead. It can probably be as basic as this:

package {
    import flash.display.MovieClip; //or Sprite, if you prefer
    public dynamic class NameOfGraphic extends MovieClip {}
}

joshtynjala avatar Mar 06 '20 16:03 joshtynjala

Oh, darn. Thanks for the response. Would it be possible in the future to add a feature to the config file that would let VSCode know which files are included in the .fla?

bls1999 avatar Mar 06 '20 17:03 bls1999

It's something that I can look into, but I'm not sure that it's possible.

joshtynjala avatar Mar 06 '20 17:03 joshtynjala

Thanks a bunch. I suppose a way to go about it would be "ignoring" the absence of files explicitly listed in the config file.

bls1999 avatar Mar 06 '20 17:03 bls1999

This feature is about to work? I need this feature too, cause i have so many generated linkage.

leuraupp2 avatar Feb 26 '24 22:02 leuraupp2

This feature is not planned because there is no way to get the linkage names from Animate.

joshtynjala avatar Feb 26 '24 22:02 joshtynjala

This feature is not planned because there is no way to get the linkage names from Animate.

Ok, thanks 😊

leuraupp2 avatar Feb 27 '24 14:02 leuraupp2