Getting FlashDevelop intellisense code hinting to work with Flash CS3 v3 components

Just a quick post here in response to a query I recently got from someone.  Since FlashDevelop doesn’t have the source of the v3 component set the automatic code-hinting won’t work for components like fl.controls.Button or whatever.

In order to get FlashDevelop to pick up these classes do the following:

  1. In Flash CS3 open the File->Publish Settings… dialog
  2. Click on the Flash tab
  3. Select ‘Export SWC’
  4. Export your project
  5. In FlashDevelop right-click on the generated swc file and select ‘Add to library’
  6. Finally right-click on the generated swc file again, click Options… and select ‘External library (not included)

Et voila!  Code hinting for all classes contained within the swf.  If you add more components to the movie they should automatically be picked up by Intellisense.

UPDATE: In fact none of this is necessary – just choosing a Flash IDE project in FlashDevelop links in the appropriate libraries from the start.  Thanks to Philippe for pointing this out!

On a further note (and in reponse to a question posted on the FlashDevelop forum), if for some reason you are unable to turn off ‘Automatically declare stage instances’ in Flash and want Intellisense to pick up the objects on the stage you can hack this by re-declaring the instances in a separate namespace.  For example, if you have a TextInput component and a TextField on your stage you could do:

   1: public class TextEntryView extends Sprite {
   2:  
   3:     namespace dummy;
   4:     
   5:     dummy var textInput:TextInput;
   6:     dummy var textField:TextField;
   7:     
   8: }

Now typing textField into the IDE will automatically pop up a list of available properties and methods like usual.

7 comments

  1. If you create an AS3 “Flash IDE” project it will have a special “Intrinsic library” defined in the project settings to bring a “rich” code completion for Flash CS3 components.

  2. “In FlashDevelop right-click on the generated swc file and select ‘Add to library’ “.

    Please tell us, you moron, how to do a “right click” on the generated swc file? (jees!!)

  3. For what it’s worth, although the first example SEEMS too complicated to be the right solution, it’s the only way I’ve found to get purely AS3 flashdevelop projects to compile (using flex sdk instead of flash ide) – publish the flash file to a .swc and adding it to the flashdevelop library is really easy enough, all things considered.

  4. For some reason I needed to use the full path to the intrisic C:Program FilesFlashDevelopLibraryAS3frameworksFlashIDE for it to work the partial relative bath did not (and has never worked) for some reason and .swc adding strangely did not add support either. Though I do recall it working at some point. If anyone has the similar problem and you do see it under Compiler Options, Intrisic libraries just add the full path to the bastard library. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *