Exported SWC doesn't preserve auto-complete functions' parameters' names

I am using Flash CS5 and I have created a large, rarely changing framework that I don't want to be recompiled every time I use it in my projects.

I must be doing something wrong because the "auto-complete" functionality doesn't show the names of the parameters of the functions.

For example, I have a function:

public class Hey {
    public function show(name:String, num:Number, data:Array):void {...}

I export the SWC file and when I import it into another project, then the auto-complete for this function shows :

show(arg0:String, arg1:Number, arg2:Array):void

So, instead of "name", "num" and "data" I get "arg0", "arg1" and "arg2".

I have downloaded other SWC files and the auto-complete gets the names correctly.

Am I doing something wrong at export-time?


I suppose you compile with debug=false but should be debug=true to keep all necessary data in swc including arguments names.

Optimizing libraries means to remove debugging and other code from the library prior to deployment. For normal libraries that you are not using as RSLs, you do not need to optimize. This is because you will likely want to debug against the library during development, so you will need the debug code inside the library. And, when you compile the release version of your application, the compiler will exclude debug information as it links the classes from the library.


I have never been able to get an SWC generated with the Flash Pro IDE to supply the correct parameter names in code hints. For some reason, the Flash IDE either does not use the same compiler or does not use the same compiler options as the Flex SDK toolkit.

You can generate code-hinting-compatable SWCs with Flash Builder by creating a Flex Library project. The "Flex" part of "Flex Library" is a little misleading. You can build AS3-only SWC files with this project type.

Or if you don't feel like shelling out the money for Flash Builder, you can always download the free Flex SDK and use the compc compiler to generate the SWC for you. It's the same tool set that Flash Builder uses to generate SWCs, so you will get the same code-hinting ability. The syntax is pretty straight-forward if you're used to command line tools:

compc -source-path . -include-classes MyCustomClass -output=MyLibrary.swc

Hopefully someone can post a better answer and prove me wrong, but I've never seen a Flash-generated SWC include the parameters in code-hinting.

Need Your Help

autocomplete in Solr and sunspot

ruby-on-rails autocomplete solr sunspot sunspot-rails

I'm building a website with RoR and I use Sunspot and the solr Search Engine. I needed to use autocomplete functionality but I couldn't.

How can I make a TListView header caption centered in a VCL styled application?

delphi delphi-xe6 vcl-styles

I'm having a list view control (ListView here), and I'm filling it by the code like this: