Skip navigation
Currently Being Moderated

Flash CS5 code hinting not working?

May 1, 2010 10:47 AM

Just installed the new Flash CS5 trial and code hinting doesn't appear to be working! I have added all my custom class paths in to the AS3 source paths, but I don't get any code hinting for any of these just the same old code hinting you get in CS4. Am I doing something wrong or does it just not work?

 

UPDATE: If it helps, in the code editor i get a small yellow triangle with an exclamation mark in, in the bottom right hand corner. When I have over this it advises me:

 

" *** Unable to build code hint cache. Please save the associated FLA into a different folder. There are too many files on the classpath. *** "

 

This error message appears no matter what FLA/Class i open, and moving it makes no difference.

 

UPDATE: Problem solved, the "There are too many files on the classpath" was the clue! Slimmed down my library and all seems to work now.

 

However, this does bring me on to another question.. does anyone know how many class files flash can comfortably cache? I use some fairly chunky libraries in my work and am wondering if i'm going to find myself constantly slimming them down after a while?

 
Replies 1 2 Previous Next
  • Currently Being Moderated
    May 7, 2010 9:27 PM   in reply to the_lambinator

    Hi,

     

    Lee Brimelow recently blogged about how to set the classes limit for the code-hinting cache at http://theflashblog.com/?p=2002

     

    We are working on an official tech note for people who use big code libraries.

     

    HTH,

    Nivesh (Flash Pro QE Lead)

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 3, 2010 6:47 AM   in reply to the_lambinator

    I have the same issue, the code hints in Flash/Actionscript do not work. I looked and looked for the answer as well.

    Then I decided what most often works, is deleting the preference file (which is often corrupt).

    You can delete it from the flash folder or Quit the Flash Program, then once Flash is closed

    hold down the ctrl+alt+shift at the same time as you launch Flash.

    It will come up with a question, mine asked Allow Flash.exe to make changes to my system, I said yes.

    Launced Flash again and now my code hints are working.

    Hope that works for you.

    Gail

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 7, 2010 7:18 AM   in reply to the_lambinator

    I have this same problem. I can hold the Ctrl + Spacebar and get the code hints but it still has problems. It sometimes appears to bring up the wrong code hinting as well... say on a MouseaEvent. You have to first get the code hint for a MouseEvent then after Flash adds the import statement the code hints for a MouseEvent appear.

     

    When trying this out I add a Movie Clip and add to the instance name "_mc". This has always showed the code hints... now you have to press the Ctrl+Spacebar to get them.

     

    If anyone finds a solution, please let us know...

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 11, 2010 4:36 AM   in reply to the_lambinator

    Same or similar problem here.

     

    Initially when I installed CS5, code hints worked fine. It used to:

    - give me hints for built-in types, methods, properties, etc

    - give me hints for my custom classes, for all the classes located in the same folder as the class I was editing, that is, I didn't need to add anything to the paths. If I referenced a class that was located in the same folder as the one i was editing, it automatically found it and gave me code hints

    - it used to automatically add import statements. For example, if I wrote "var a:MovieClip", it added automatically an "import flash.display.MovieClip" statement at the beginning of the script

     

     

    Then it stopped working: it would not give me any hint, NOT EVEN for built-in ones. And it wouldn't add import statements any more.

     

    Deleting the preferences file (starting with ctrl+shift+alt) only partially fixed the problem: I now getjust SOME hints, only with built-in types and only a little subset of the hints you would get even from CS4.

     

    But code hints with my custom classes (located in the current folder) don't work, AND import statements are not automatically added.

     

    That is, it works worse than CS4. The CS5 intelligent code hints functionality are gone.

     

    Please, someone from Adobe, tell us how to fix this annoying issue. The code hinting is completely broken.

     

    thanks

    m.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2010 10:36 AM   in reply to matteosistisette

    I need this answered to. I have been working on a large project with no problems in Flash CS4. We need to

    export Flash Lite 4, but this is a serious issue that is hindering development.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2010 10:47 AM   in reply to skerr09

    So far the only way I can get it to show code hints on IE: MovieClips with the _mc is by using the Ctrl+Spacebar. Even on Mosue Events it will not show the Event Hints until the import flash.Events.MouseEvents is added. The it shows the MouseEvent code hints.

     

    I hope they get this fixed soon. It is a pain to always use the Ctrl+Spacebar. CS4 I never had this problem.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2010 12:25 PM   in reply to socalfish-fDJTBM

    This is really strange, because I actually SAW a copy of CS5 with code hints working fine, and they were great: it would give hint for your custom defined classes (no need to add them to any path, just saving tha as files in the same directory), and it automatically added the import statements every time you wrote the name of a class that you hadn't imported yet.

    And it was the Master Collection trial downloaded from Adobe's website, the same one I downloaded. But on my computer it does not work.

     

     

    Does anybody from Adobe give a sh*** about this?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2010 12:29 PM   in reply to matteosistisette

    I just got it working.

    Apparently, the code hit engine is searching EVERY folder in your project file. Well, I guess I had too many. They should really have this something you set in the instead of just iterating through files like this.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2010 12:30 PM   in reply to the_lambinator

     

    I just got it working.

    Apparently, the code hit engine is searching EVERY folder in your project file. Well, I guess I had too many. They should really have this something you set in the instead of just iterating through files like this.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2010 12:56 PM   in reply to skerr09

    Not my case.

     

    I have only one folder. I mean, the folder containing the .fla file and the .as files have no subfolders.

     

    Also, did you have an alert icon somewhere on the bottom-right part of the screen indicating this? Many users who report this fix see this alert icon.

    I don't see any.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2010 12:58 PM   in reply to skerr09

    Hi,

     

    By default, the current working directory is  part of the FLA's classpath (signified by the '.' in the classpath  dialog).  If Flash is unable to build the code-hint cache due to too many classes and files/folders in your classpath, it will display an alert icon at the bottom right of the code editor with a tooltip that specifies what you can do to alleviate the issue.

     

    We're glad you were able to get it working.

     

    -Nivesh

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2010 1:02 PM   in reply to matteosistisette

    Hi,

     

    >> Deleting the preferences file (starting  with ctrl+shift+alt) only  partially fixed the problem: I now getjust SOME hints, only with  built-in types and only a little subset of the hints you would get even  from CS4.

     

     

    Flash doesn't delete the  preferences files when you launch it while holding ctrl+shift+alt.  Please try resetting your code-hint cache as follows:

    1. Quit Flash

    2. Delete your code-hint cache folder

     

    Win XP:
    C:\Documents and Settings\<user>\Local Settings\Application Data\Adobe\Flash CS5\<language>\Configuration\CodeModel

     

    Win Vista/Win7:
    C:\Users\<user>\AppData\Local\Adobe\Flash CS5\<language>\Configuration\CodeModel

     

    Mac:
    /Users/<user>/Library/Application Support/Adobe/Flash CS5/<language>/Configuration/CodeModel

     

    3. Re-start Flash and try again.

     

    HTH,

    Nivesh

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2010 1:06 PM   in reply to nrajbhan

    Flash doesn't delete the  preferences files when you launch it while holding ctrl+shift+alt.  Please try resetting your code-hint cache as follows:

    1. Quit Flash

    2. Delete your code-hint cache folder

     

    Win XP:
    C:\Documents and Settings\<user>\Local Settings\Application Data\Adobe\Flash CS5\<language>\Configuration\CodeModel

     

     

    3. Re-start Flash and try again.

     

    HTH,

    Nivesh

     

    I already did that (sorry I forgot to mentiion). Didn't solve the problem.

     

     

    By the way I'm afraid I was wrong when I said it used to work when freshly installed. I actually saw it working on a friend's computer, but I'm not sure it ever worked on mine.

     

    Note that I don't have any alert icon and I have nothing in the classpath (never touched it).

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2010 1:17 PM   in reply to matteosistisette

    What's in your global classpath settings (Edit -> Preferences -> ActionScript category -> ActionScript 3.0 Settings... button)?  Do you commonly use other class libraries like PaperVision, gTween,  as3corelib, etc.?  If so, how many classes are in your FLA's classpath and in the global classpath?

     

    What folder do you save your files in?  Does it help if you save to a different location?  The current working directory is part of the default classpath settings, so if you save your FLA on the Desktop, that can cause the code-hinting cache creation to fail since you might have lots of other files/folders on your Desktop too.

     

    Do you have other user accounts on that machine?  If so, does code-hinting work for those other accounts?


    Thanks,

    Nivesh

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2010 1:58 PM   in reply to nrajbhan
    What's in your global classpath settings

     

    Flex SDK path: $(AppConfig)/ActionScript 3.0/flex_sdk/4.0.0/

    Source path: (empty)

    Library path: (empty)

    External Library path: (empty)

     

    Do you commonly use other class libraries like PaperVision, gTween,  as3corelib, etc.?

     

    No, never, none... yet.

     

    What folder do you save your files in?

     

     

    I always create a dedicated directory for each project. The directory is often not "clean", meaning there can be a couple .fla files (and some backup of the same file), some subfolder with unrelated .as files or backed-up .as files. This should not be enough to confuse the hints engine (if it is, then it sucks). I never create packages, so subfoldera only contain unrelated material, tests, or backups: mostly junk.

    But I NEVER have _many_subfolders with dozens of files in it.

     

    Does it help if you save to a different location? 

     

     

    Actually my folders usually are on a network drive.

     

    Now I did some tests and the results are crazy:

     

    - moving an existing folder where hints don't work to another location inside C:/some/where doesn't help a bit

    - creating some .fla and .as files FROM SCRATCH in a fresh new dir in C:/some/where/else ALL HINTS WORK (including automatic import statements)

    - doing EXACTLY the same in X:/some/path (where X: is the network drive), sometimes hints work, then they stop working, in a random fashion, such as: I write

      var somevar:M...  --> hints appear, and if I choose MovieClip, the corresponding import statement is added

      var someothervar:S  --> hints don't appear, and if I write Sprite, NO import statement is added

     

    They stop working _very_ soon, with just a couple of lines of code without syntax errors.

     

    It seems that the hinting engine is extremely fragile, and at the slightest unexpected (by it) condition it fails and silently stops working without giving any hint (ops) about the cause of the failure.

     

    Also, does it work only with projects that you create from scratch while he watches you write????

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2010 2:10 PM   in reply to matteosistisette

    Hi,

     

    >> - moving an existing folder where hints don't work to another location  inside C:/some/where doesn't help a bit

     

    Does the folder contain any hidden files/folders?  How many files/folders does it contain total?  It doesn't matter if they are AS or FLA files.  I just want to know the total number of files and folders within that folder that you are working in.

     

    Note that we do not support working over a networked drive - http://kb2.adobe.com/cps/000/d9bbd9d4.html

     

    Thanks,
    Nivesh

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2010 4:02 PM   in reply to nrajbhan

    No hidden files or folders.

     

    6 folders and a total of 51 files (of which 34 in the "root" folder and the rest in subfolders).

     

    Most are .as files, few fla files and few other files. I'm "using" only one fla file, the others are backups or tests.

     

    None of the subfolder corresponds to any package: my custom classes are all in the top level package and in the root folder. Subfolders contain images, backups, notes, and exported bins: all should be irrelevant to Flash.

     

    The .as files that I am really using are 22. They have no syntax error: the main fla compiles and runs fine.

     

    As I mentioned, moving the whole folder to the C: local drive didn't fix the problem.

     

    Note that we do not support working over a networked drive - http://kb2.adobe.com/cps/000/d9bbd9d4.html


    The Adobe Flash IDE, FLV Encoder, Adobe Media Encoderand Flash Player were not designed to function across LANs.

     

    Oh wow, you were not kidding me. Can't believe that.

     

    Were they designed to work on computers?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2010 9:43 AM   in reply to matteosistisette

    Has anyone figured out a solution yet?

     

    I'm having the same issue. However, for me it sees the hints are working with the keyboard shortcut (Ctrl - Space) but the automatic code hints never pop up, even though I have them turned on. This problem occurs no matter how many library items, files in the folder, or where the folder and file is saved.

     

    However, I wasn't able to test the deletion of the config file solution as it wasn't located on my machine where the thread indicated nor could a windows search find one.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2010 10:00 AM   in reply to tomservo6

    Ah, I think I've figured out the reason on my own; it's an AS3 issue, not a

    bug.

     

    Created a shape on the stage, changed it to a movie clip, gave it an instance name of my_mc.

    Started a frame script by typing "my_mc." but no code hints. The code hints work in AS2 but not in AS3, where no classes have the recognized built in methods and properties (such as alpha, mouse events etc.). Thus it doesn't know what code hints to bring up.

     

    Another confirmation on why AS2 seems to me to be much more superior to AS3 for simple Flash development.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2010 11:01 AM   in reply to tomservo6

    Why shouldn't it give you AS3 hints for a movieclip?????

     

    Your my_mc is an instance of flash.display.MovieClip which does have properties and methods such as alpha, witdth, x, y, so it should pop them up just as in AS2 it would pop up _alpha, _width, _x, _y.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2010 11:23 AM   in reply to matteosistisette

    I agree. Creating a movie clip instance on the stage called "myClip_mc" should give you code hints for the movie clip class (x, y, alpha, etc). It worked in AS3 in CS4 but not in CS5. This blows!

     

    Is there in fixes for this????

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2010 11:46 AM   in reply to Sparkerman1711

    I thought adding a import flash.dispaly.MovieClip might bring in the code hints for a MovieClip having the instance name my_mc. Still no hints unless you use the keyboard shortcut.

     

    Yes code hinting worked in CS4 in AS3. Still Adobe has not been able to resolve this issue in CS5... to my knowledge. Wish they would, cause it would sure cut down on my typing!

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 4, 2010 11:54 AM   in reply to socalfish-fDJTBM

    What I don't like about the keyboard shorcuts is that they seem to show properties and methods that don't relate or not valid to the object you are using. I guess it's better than nothing.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 5, 2010 11:38 AM   in reply to the_lambinator

    Ok after testing a bit more I can say that:

    - it has nothing to do with storing files in a network drive. Whether I save my files on a network drive or in a local drive, it just sometimes works and sometimes not

    - When I open existing files (that I created before I got Flash CS5), code hints NEVER work

    - When I create them from scratch, they sometimes work at the beginning. Then they soon stop working. Sometimes they stop working as soon as I save, sometimes they do work a little longer, but then stop working; just a matter of time, even if I don't close and reopen anything. Anyway, sometimes they don't work at all from the beginning, even if creating the files from scratch.

    - it has nothing to do with the presence of any hidden files/folders nor with big folders with too many files. I always work with folders that have a reasonable number of files/subfolders and NEVER have any hidden file or folder (which anyway shouldn't matter at all).

     

    When is the fix expected???  This is a serious issue: you cannot expect any developer working at any serious project to work without the most basic code hintings. Note that this is way worse than previous versions: this is basically no code hinting at all. It is like writing  your code with the Note Pad.

     

    Please say something. Thousands of buying customers are left with a broken product that has less functionality than the previous version, and nobody from adobe is saying nothing???

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 15, 2010 5:12 PM   in reply to matteosistisette

    Adobe simply done caring about this app.

     

    It keeps getting worse.

     

    I mean, how dumb do you have to be to release a version where code hinting aint working. HAHA

     

    Flash CS Still HAS SO MANY BUGS>.... But adobe they just launched CS5 and spat on all the CS4 users.

     

    Ironically Apple put adobe in their place by not allowing the ipad and iphone to use flash..

     

    As a matter of fact I understand... If I was producing a nice product like the iPhone I would most def. NOT

    want to have SUCH A BUGGY platform like flash to RUIN my product.

     

     

    I'm thinking of flushing flash and going onto the Java/html train....

     

     

     

    Adobe, if you read.... You are making idiots out of youself the past years with ALL those new bugs...

     

    PS - browing HELP in CS3 was NICE.... CS4 worse but VS5 with the Help App is slower as when the first Internet browser

    arrived 15 years ago.. You SUUUUUCK

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 16, 2010 3:53 AM   in reply to AtonMusic

    Yes, that's the problem, they don't give a f### if their software doesn't work.

    However if they don't care they shouldn't release it and SELL it.

    When you pay around $500 for a program you expect it to work decently.

    When such an embarassing issue is found that renders the program almost USELESS, I would expect them to create a task force of people working on it NIGHT AND DAY to fix it within about 48 HOURS and immediately  release a  patch that fixes it.

    But they just sit back ad watch thousands of customers buying a product that  instead of increasing their productivity kills it.

     

    But adobe they just launched CS5 and spat on all the CS4 users.

    AND on the CS5 users as well.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 16, 2010 6:01 PM   in reply to matteosistisette

    Woah, I didn't expect this to turn into a war on Adobe thread when I first asked; I just wanted to find out if there was a solution. It's not an app killer, just a minor inconvenience. Flash isn't going anywhere, despite Apple's bonehead decision. It's just when you develop software as fast as Adobe does, trying to satisfy many different users, bugs crop up. That's my only problem with Adobe's business plan - too much too fast breeds that many more bugs; it's a catch-22.

     

    I prefer the simplistic design of Macromedia back in the day, especially with Flash. I teach Flash at a university, both beginner and advanced users. The biggest problem I've encountered from an educator's perspective is the push to AS3. Adobe tried to cater to programmers with AS3 and left designers in a lurch. In my humble opinion, new versions should both do more and become more user friendly. The reason everyone gives for AS3 is that AS2 was buggy. AS2 was not buggy, people were writing buggy scripts, much as they did with HTML 4 and lower. Adobe should have taken a page from the W3C and XHTML and just made it more strict, closing the holes that caused the bugs. Rewriting the scripting and making it more complex seems to pile on the problems. Why should something that took one line of code (clicking on a movieClip to move to a frame) now take 5 or more lines of code (creating a listener object, assigning a listener object, writing a function)?

     

    That's why the code hinting bug bugs me. AS3 is so overly complex that code hinting becomes all the more necessary. I'll stick to AS2 in my classes. But to demonize Adobe is a bit much. There are bigger things to complain about. Using their pretty remarkable products (where would we be without PS or DW?) is not a right, it's a (sometimes frustrating) privilege.

     

    So Adobe mods, we're frustrated but only because we're all loyal users who depend on your products. We wouldn't be posting if we weren't.

     
    |
    Mark as:
  • kglad
    72,261 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 16, 2010 6:28 PM   in reply to tomservo6

    did you check j dehaan's blog about cs5 code hinting?  if not, check it and see if it helps you:  http://flashthusiast.com/

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 17, 2010 2:23 AM   in reply to kglad
    The reason everyone gives for AS3 is that AS2 was buggy.

    I don't think so. AS3 is a better language, better designed, more consistent, more powerful. I would switch to AS3 for that, not because of bugs - but I don't know what's the reason behind everyone's choice.

     

    AS2 was not buggy, people were writing buggy scripts

    AS2 was buggy. Maybe people were writing buggy scripts too, but believe me it was buggy. However AS3 is at the very least equally buggy. It is better designed, more consistent, but equally buggy in its implementation.

     

    All software have bugs, but programming languages usually undergo a stricter and more thorough revision than other kinds of sofware because the consequences of bugs in a programming language are more disastrous.

    But that's not the case of ActionScript. Maybe because of its history and its legacy, or maybe because Adobe was always dedicated to completely different kinds of software, like PhotoShop, Premiere and the like, and suddenly dove into the business of developing a programming language without having the know-how.

    The level of bugginess of ActionScript is amazing. I work with actionscript daily and there's no day that I don't run 4 ot 5 times into some problem due to some bug. Not that I discover new bugs every day, just run into them - sometimes they are already reported, other times they are not.

    Why should something that took one line of code (clicking on a movieClip to move to a frame) now take 5 or more lines of code (creating a listener object, assigning a listener object, writing a function).

    It often happens that a language that is in the overall more elegant, consistent and compact, turns out to need a bit more of code for doing the simplest things. Maybe what could be done with 1 line of code now takes 5, but things that took 1000 lines of cumbersome awkward tricky and hacky code can now be done with just 100 of readable and simple-to-understand code.

    When I first learned Java I was surprised at the quantity of code I had to write just to make a program that would print "hello world", while in most dialects of Basic it was just:

    10 PRINT "Hello world"

    Would you say Basic is superior to Java in any sense?

     

    I teach Flash at a university, both beginner and advanced users. [...]

    I'll stick to AS2 in my classes.

    You should think about the damage you may be doing to your students. If they are going to use ActionScript professionally, they'll have to learn AS3, rather sooner than later. So why not save them the pain to do the effort twice? If instead you are teaching them AS just for didactic purposes (i.e. for learning programming in general) and don't care about practical applications and you don't like the way AS has evolved (i.e. AS3), then consider teaching them another language, instead of an obsolete version of a current one.

     

    AS3 is not more complicated, or difficult to learn, or less designer-friendly or non-programmer-friendly than AS2. Not at all; rather the opposite. It is more complicated and difficult to learn when you already know AS2, because you feel like everything you knew is useless - but the same can be said about learning AS2 when you already know AS3. Starting from scratch, AS3 is indeed simpler.

     

     

    But this have drifted OT, sorry. Back to the topic:

    It's not an app killer, just a minor inconvenience

    It's a major inconvenience if writing the same amount of code takes you three times the time it should take. That in 2010 you have to spell every single property/method/class name entirely from the first to the last letter, when most of the time it should be just a matter of typing a couple of characters and hit tab, is simply ridiculous. You may as well write your code with NotePad. Flash is (among other things) an IDE - something Adobe seemed to neglect up to recently; and when they finally decided to take a step into making it work like any other decent IDE, it does not work!!

    There are bigger things to complain about.

    On this you are definitely right.

     

    Using their pretty remarkable products (where would we be without PS or DW?) is not a right, it's a (sometimes frustrating) privilege.

    It's a privilege you pay for. That's when it becomes a right.

    So Adobe mods, we're frustrated but only because we're all loyal users who depend on your products

    (emphasis is mine)

     

    Exactly. That's the point.

     

    Note there's been no helpful answer from them yet: that's how much they care about loyal users who depend on their products.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 17, 2010 2:38 AM   in reply to kglad

    did you check j dehaan's blog about cs5 code hinting?  if not, check it and see if it helps you:

     

    Yes, I think we already mentioned that for some of us none of those tricks works:

     

    1) Save your FLA file in an empty folder on your hard drive and restarting Flash.

     

    Does not help. Also, it shouldn't be necessary. If code hinting does not work because you saved the file on the desktop, it means the code hinting engine s***s in the first place and it needs to be fixed. ESPECIALLY if you need to restart Flash However, that is not the case: I save the file in an empty folder and code hinting works for the first 5 minutes.

     

    2) If you are using an ActionScript (AS) file: make sure that you have a FLA file open to trigger code hints.

     

    That shouldn't be necessary. Again, if that is necessary, then the code hinting thing needs a serious fix. Anyway, that doesn't work either.

    (and the few times code hinting does work, it work also without any FLA file open)

    (I wonder whether that ever worked for anybody, because it really looks like a pure speculation like 'maybe this may help' that is published as a tip/trick without even checking whether it works)

     

    3) 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.

     

    Not the case: not using libraries, no icon.

     

    4) Reset your code-hint cache using the following steps:

     

    Doesn't change a thing. And again, if this was necessary, then the code hinting engine would need a serious fix.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 17, 2010 4:58 AM   in reply to kglad

    I've deleted the CodeModel folder and set the Project File Cap to 1000 in Hex (by the way sets the decimal to 4096). Either of these suggestions as yielded the code hints appearing when using a movie clip or text object naming them myMovie_mc or myText_txt. A MovieClip will show code hinting if I use Ctrl+Spacebar but the text does not appear to bring in the property information.. such as setting the .text = "";.

     

    However there are other code hints appearing like when I use a MovieClip as a button and type this.buttonMode then the code hinting comes when as soon as I type this. and before in CS4 it did not. Adobe has made some really great changes in code hinting and helps while you type functions etc. For me the code hinting is not working on the simple things with objects... like adding a Event Listener and using MouseEvent.CLICK... that used to come and does not now until you add the import statement. When you build the actual function the import statement is actually created for you... another great time saving feature. But it would be nice to have it created once I typed MouseEvent.

     

    I'm running a 32bit Windows 7 with 4gb RAM. And I already know that my Master Suite will perform better on a 64bit system with more RAM.

     

    I can live with the Ctrl+Spacebar, it would be nice to have it all. It's also just nice to have other things working that help simiply my coding faster.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 23, 2010 2:39 PM   in reply to socalfish-fDJTBM

    Hi All,

     

    Flash CS5 does not support the _mc, _xml, _txt, etc. code-hinting in ActionScript 3.0 files.  ActionScript 2.0 still supports these code-hinting suffix triggers.

     

    These suffix-based code-hinting triggers were added at a time when Flash didn't really even have classes.  When ActionScript 2.0 was introduced in Flash MX 2004, Flash started supporting code-hinting when you typed your variables, such as:

     

    var myTextField:TextField;

     

    myTextField.<code hinting appears here>

     

    Flash continued to support the suffix-based code-hinting triggers in both ActionScript 2.0 and ActionScript 3.0 because we didn't make many changes to our code-hinting engine.  However, we revamped the entire code-hinting engine for ActionScript 3.0 during Flash CS5.  Flash now supports code-hinting for custom classes in your classpath and code-hinting for nested parameters.  Flash no longer supports the old suffix-based code-hinting triggers that was introduced back in ActionScript 1.0 because the new code-hinting uses the code-hinting engine from FlashBuilder/FlexBuilder which never supported the suffix-based code-hinting hack.

     

    You can still use the suffix-based code-hinting for ActionScript 1.0 and ActionScript 2.0.  But, if you want code-hinting for ActionScript 3.0 content, you will have to declare your instances.  For example, if you have a TextField named myTF_txt and a MovieClip named myMC_mc, you will need to declare them as:

    var myTF_txt:TextField;

    var myMC_mc:MovieClip;

     

    Note that doing so will automatically add the import statements for those classes (another nice benefit of the new code-hinting engine), so your code should look like:

    import flash.text.TextField;

    import flash.display.MovieClip;

     

     

    var myTF_txt:TextField;

    var myMC_mc:MovieClip;

    myTF_txt.<code hinting appears here>
    myMC_mc.<code hinting appears here>

     

     

    The old suffix-based code-hinting triggers were a nice shortcut, but it was severely limited.  Hopefully, you will find the new code-hinting engine more useful over time.
    Thanks,
    Nivesh
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 23, 2010 3:52 PM   in reply to nrajbhan
    Hopefully, you will find the new code-hinting engine more useful over time.

    I find it very useful when it works. Any progress in fixing it?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 23, 2010 6:48 PM   in reply to matteosistisette

    Hey, nrajbhan's solution actually works for me! I've tested it in multiple scenarios and I have yet to get it to break as it did before. It makes logical sense as well. Flash can't display the hints if it doesn't know what type of object to display the hints for. Good explaination and solution nrajbhan (even though I still like AS2 better no matter how many try to convince me otherwise).

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2010 1:47 AM   in reply to tomservo6

    What solution????????????

     

    What nrajbhan describes is simply the expected behaviour. If you don't declare a variable's type it OBVIOUSLY won't display code hints for it. I don't care about AS2-like prefix-based code hinting which was ridiculous by the way.

     

    I have seen the new code hinting work and I perfectly understand how it works and my problem is not that I am used to a different kind of code hinting or that I don't declare variable types. My problem (and of many people that have posted here before) is that most of the time it just DOESN'T WORK. Sometimes it works, so I can tell the difference.

     

    Let's be clear.

    I type:

     

    var somevar: <--- a list of classes should appear hear; it doesn't

    var somevar:MovieClip; <----- now an import statement should be automatically added above; it doesn't.

     

    somevar. <---- a list of properties of the MovieClip class should appear, it doesn't

     

     

    So let's stop talking about the differences between AS2 and AS3 code hinting and let's talk about how to have it fixed.

     

    What do I have to do to get the code hinting work?

    When will the fix be released?

     

    (please don't mention the ctrl+space thing, that's not even a workaround, that will display a list of all properties of all classes, not only the relevant one, so it is useless)

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2010 9:46 AM   in reply to matteosistisette

    Hi matteosistisette,

     

    There are definitely two issues.  One issue is that people are expecting the suffix-based code-hinting (_mc, _xml, _txt, etc.) to trigger code hinting in ActionScript 3.0, which is no longer supported.

     

    You are encountering a different issue where the new code-hinting engine sometimes works and sometimes doesn't.  The workarounds I listed above has resolved this for all other users, but it still hasn't resolved it for you.  Please re-delete your code-hinting cache as follows:

     

    1. Quit Flash

    2. Delete your code-hint cache folder

     

    Win XP:

    C:\Documents and Settings\<user>\Local Settings\Application Data\Adobe\Flash CS5\<language>\Configuration\CodeModel

     

    Win Vista/Win7:

    C:\Users\<user>\AppData\Local\Adobe\Flash CS5\<language>\Configuration\CodeModel

     

    Mac:

    /Users/<user>/Library/Application Support/Adobe/Flash CS5/<language>/Configuration/CodeModel

     

    3. Re-start Flash and try again.

     

    Since you are finding that code-hinting works in some cases and not in others, please check the following:

    - In order to get code-hinting in an ActionScript file, you will need to have an AS 3.0 FLA file open in the IDE.  Otherwise, the IDE doesn't know which code-hinting engine to use (AS 2.0 or AS 3.0 engine).

     

    - Since code-hinting works sometimes and fails at other times, please check the per-FLA ActionScript settings for the files in which it fails (File -> ActionScript Settings...).  The Source Path tab should have a '.' in the classpath to designate the current working directory should be in the classpath.

     

    Thanks,

    Nivesh

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 27, 2010 3:54 AM   in reply to nrajbhan

    I deleted AGAIN the code-hinting cache but the behaviour is still the same.

     

    It seems the code hinting engine is just too fragile and there are a lot of conditions that have (and shouldn't have) to be met in order for it to work.

     

    Here's an example of an absurd behavior that you can certainly reproduce. Note that it is not an example of a big annoyance but it is very easy to reproduce.

     

    1) Choose File / New / ActionScript 3.0 class. Call it TestClass

    2) In the constructor write:

         var m:Mo  // Code hints appear here, the old CS4-like ones, with a blue arrow as an icon. I can choose MovieClip.

                        // However it WON'T add the import statement.

     

    Arguing that it doesn't know which hints to use (AS2 or AS3) doesn't make sense, because it's actually giving code hints for AS3, so why doesn't it add an import statement????

    But this is only the beginning.

     

    3) Save the class as TestClass.as. Try the above again: nothing changes.

    4) Create a new fla file: File/New/ActionScript 3.0 (fla). Don't even save it.

     

    5) Now go back to TestClass.as and test the above again, and SURPRISE:

        var m:Mo  //NO CODE HINTS AT ALL! NOTHING APPEAR

     

    If you write

       var m:MovieClip;

       m.  //NO CODE HINTS AT ALL

     

    6) Save the fla file  as test.fla in the same folder as the .as file. Nothing changes.

     

    It may make sense that having a .fla file open without any relation to the .as file we are editing doesn't help. But it makes no sense that it makes things worse: without the .fla open we have the old crappy code hinting; with the .fla open (but no document class) we have no code hinting at all.

     

    Let's go on. Now this is the expected part

     

    7) In the fla file test.fla, put TestClass as the document class and save it.

    8) Go back to TestClass.as and try again:

        Now code hints work. The glorious CS5 ones, with a green circle as an icon, and it automatically adds import statements.

     

     

    So first of all when you insist on this:

    - In order to get code-hinting in an ActionScript file, you will need to have an AS 3.0 FLA file open in the IDE.

    you should mention that it is not enough to have an AS3 FLA file open in the IDE, it needs to be linked to a class saved in the same folder as the class you're editing.

     

    9) Create a new AS3 class, cal it AnotherTestClass.as and save it.

    10) Try code hints: they WORK.

     

    This is a NICE surprise, because AnotherTestClass is not mentioned either in the fla file nor in the TestClass class, so it is not "linked" in any direct or indirect way to the fla file.

    Good. But then I wonder: why didn't code hints work when editing TestClass before I set a document class for test.fla??

     

     

    There's just too many things you have to be careful about if you want code hintings to work, and that shouldn't be so. It should be just a matter of start writing code. I've never seen an IDE work like this.

    Instead of wasting time writing (incomplete and inexact) articles explaining the 1001 steps one has to follow to have code hints work, you should work on improving them so that one does not need to do anything.

     

     

    ---------

     

    Then another thing, but you already know that, is that code hints don't work if the files are saved in a network drive. I know that "using flash on network drives is not supported" but that is just ridiculous. It should be supported. Not supporting network drives is just like not supporting a tablet as a pointer device, or not supporting screen resolutions above 1024x768 - or not supporting non-english keyboards. There are things that a commercial software vendor simply cannot decide not to support. It should be considered a bug rather than an unsupported feature.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 4, 2010 10:51 PM   in reply to the_lambinator

    I dont have any of these issues (many flash files/folders etc) I do have the yellow exclamation with a message ***building cache*** that dont go away - the two odd things is that this machine has no internet connection and my prog files are not on the C drive.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 7, 2010 3:00 PM   in reply to the_lambinator

    I Did what Lee Brimelow post in hes blog: opened changed the defult files to hint to 1000. Then moved the FLA to different directory, opened it, open .AS file from the original directory, closed the .FLA file, moved it to it's original directory, opened it again and the cache started to build again... And it works now

     
    |
    Mark as:
1 2 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points