Tips for code hints in Flash CS5

There are a number of forum posts about code hinting not showing up as expected in Flash CS5 documents. There are a number of possibilities about why code hints do not show up, but the following post will collect some troubleshooting tips that may help you out.

  • Save your FLA file in an empty folder on your hard drive and restarting Flash. The code hinting cache may not be created if you have too many FLA files saved in the same directory (such as your Desktop or Documents folder).
  • If you are using an ActionScript (AS) file: make sure that you have a FLA file open to trigger code hints.
  • If you use class libraries and see an icon in the Script edit window (bottom-right corner), try increasing your code hint class limit. See this post on the Flash Blog for more information.
  • Reset your code-hint cache using the following steps:
      1. Quit Flash.
      2. Delete the following folder:

    Win Vista/Win7:
    C:UsersusernameAppDataLocalAdobeFlash CS5languageConfigurationCodeModel
    Win XP:
    C:Documents and SettingsusernameLocal SettingsApplication DataAdobeFlash CS5languageConfigurationCodeModel
    Mac:
    /Users/username/Library/Application Support/Adobe/Flash CS5/language/Configuration/CodeModel

Jen deHaan is a consultant specializing in instructional design, web design, WordPress, technical project management, and writing. She is based in the San Francisco Bay Area.

Tagged with: , , , , , , , ,
Posted in ActionScript 3.0, Flash CS5, workaround
  • matteo

    Cool article, but _none_ of the mentioned tricks worked for me.

  • John

    Me either – still no code hinting. If you have a solution, please post! Thanks in advance.

  • Carlos Schlottfeldt

    Looks like new cs5 just shows code hinting after you initializated the variable.

  • Morten Carlsen

    Does not work.

    Adobe has lost control over this app completely. Keeps getting worse.

    Code hinting worked perfectly in FL CS4 ans CS3

    • http://www.flashthusiast.com Jen deHaan

      Is anyone trying to use things like instance_mc to generate code hints? I’m wondering if that might be the problem… (This won’t work in AS3)

  • Wilmark

    I wonder if its due to the fact that im not connected to the internet – ive noted that all of the help stuff is online now – unless adobe pays my internet theyre not using my connection for free.

  • Tigger

    Jen – stop working so hard and come home and take me for a walk at OB!

  • http://www.flashthusiast.com Jen

    Haha, I see that Tigger has learned how to type!!

  • http://www.modaellipsis.com Durmon

    Hi. Maybe you would like to know, or maybe you don’t, but your post pages do not display properly in IE6. I have the misfortune of using it at work. I thought your website was empty but it turns out the content just drops below the sidebar. Home is fine.

  • http://abeall.com Aaron Beall

    I’ve been having on and off success with code hinting and here’s a few additional things that snagged have me up:

    - Code hinting does not work if the class in question is not imported. This is – depending on the way you look at it – a regress from CS4 and earlier, since all shipped classes were automagically recognized within an FLA with or without import statement, which is no longer the case. ALL CLASSES must be imported for any hints whatsoever to show for them. I suppose this is to accomodate the [awesome] new feature of hinting custom classes, which could be anything. Needing to always import now might be obvious to a hardcore developer but it snagged me up for a few months at least.

    - Related to above, the new auto-import declaration feature is nice except it really only gets triggered half the time, leaving you the other half the time with the problem above unless you manually type out an import (and know to do so.) I finally found a quicker solution to that other half of the time: right after typing a class name which isn’t yet imported, if Flash hasn’t recognized it and created an import statement automatically, press Ctrl+Space and it will search your classpath for matching classes and let you select one manually, then it will insert an import statement. Took me awhile to come to understand this but now code hinting works for me most of the time, except:
    - Components don’t give any code hinting, even if you import the component classes — still no hinting. I haven’t been able to solve this on. Any ideas?

    - Aaron

  • Gustavo

    GREAT ! THANKS !

  • http://nertworks.com fenderflip

    I’ve tried everything in this post and nothing brings back the precious code hinting.

  • http://hostingbest.co.uk Hosting Best

    The best tip you can give to someone wanting code hinting is to move to FlashDevelop….. its a hundred times better and may take a couple of hours to get used too but saves you so much time in the long run

  • Tyler

    i am using this code

    stop();
    forumslink.addEventListener(MouseEvent.MOUSE_DOWN, myBtnHandler1);
    function myBtnHandler1(event:MouseEvent):void {
    gotoAndStop(1, “Scene 3″);
    }

    with forumslink being a button which links to a forums scene, scene 1 homepage and scene 3 the actual forum

    although when i debug it the forum button doesnt work on the homepage
    do i need to edit the code more?
    as you can tell i am new to flash cs5

    any help appreciated :D

  • yaya

    my code hinting stopped, just on one particular FLA i’ve been working on for the past many months..
    for whatever reason, what got it working again was opening the FLA via Windows Explorer, as opposed to clicking its filename within Flash’s quickstart window’s Recent Items..

    *_*

  • http://none neo

    just write “xxx_mc.” and code hint will appear.
    So it is good to have give symbol name with _mc.
    Enjoy !!

  • David Vicks

    Deleting the “CodeModel” folder worked for me. Well I just did one little test. However the location of this folder is not where the originator of this blog (FLASHENTHUSIAST) said it was.

    For me on the Mac it was located in:
    Applications–>Adobe Flash CS5 –> Common –> Configuration –> CodeModel

    Even if this is the fix … why does this work?… and how do I prevent this from happening again?

    Dave

  • Piotr

    Deleting the “CodeModel” folder worked for me on my PC
    ON my PC the location was the same:
    C:Program FilesAdobeAdobe Flash CS5.5CommonConfiguration

    Thanks a lot!!

  • jerz

    On my MAC deleting this folder (CodeModel) also help!

    Thanks a lot!

  • sara

    im having real problems in flash, im almost done with my website i just need BIIIIIGGG HELP with the last step, PPPPLLLLZZZ HELP ME :’(…
    i have a main page that works perfectly wen i just open my site, in it are buttons that takes me to three other minor pages, there are buttons in the minor pages that takes you back to the main page. when i click on these buttons and get i succesfully get to the mainpage, the codes don’t work anymore and i cant click on the buttons to go to the minor pages :S!!! WHAT IS THE PROBLEM :’(.. it works in the begining and then it does’t this doesnt make sense:

    this is the code i use:

    stop();
    buttons.buttonmotion.addEventListener(MouseEvent.CLICK, klk);
    function klk(event:MouseEvent):void {
    gotoAndPlay(“motionreal”);
    }

    stop();
    buttons.buttonmodeling.addEventListener(MouseEvent.CLICK, hhh);
    function hhh(event:MouseEvent):void {
    gotoAndPlay(“modelingreal”);
    }

    stop();
    buttons.buttonprint.addEventListener(MouseEvent.CLICK, kjk);
    function kjk(event:MouseEvent):void {
    gotoAndPlay(“printreal”);
    }

    stop();
    buttons.buttonweb.addEventListener(MouseEvent.CLICK, lkk);
    function lkk(event:MouseEvent):void {
    gotoAndPlay(“webreal1″);
    }

    stop();
    buttons.buttonaboutme.addEventListener(MouseEvent.CLICK, sos);
    function sos(event:MouseEvent):void {
    gotoAndPlay(“aboutmereal”);
    }

  • http://weather.com Beau

    I’ve deleted the folder, and code hinting will now work on NEW files, but continues to fail on the older ones. I’m guessing there’s a class thing with existing ads, maybe a library issue?

    But yay. New files, it’ll work. That’s a good start.

  • Greg

    Just wanted to say thanks. I just had to go back from CS5.5 down to CS5 for a project and ran into this issue. Removing CodeModel is working out for me as well so far.

  • Mark

    Windoes 7 Solution

    This method work..I just want to contribute by saying that the method described by the originator of the post could be correct.
    I write this because My “AppData” folder was hidden by the system, so make sure that the hidden folders are visible on your system.
    Then delete the “CodeModel” folder located in:
    Win Vista/Win7:
    C:UsersusernameAppDataLocalAdobeFlash CS5languageConfigurationCodeModel
    And if it still doesn’t work, or you cannot find the folder delete as well the one in:
    C:Program FilesAdobeAdobe Flash CS5.5CommonConfigurationCodeModel