I noticed something interesting about Flash CS5's code hinting recently. I wanted to import the greensock classes. I hadn't yet set my classpath for the directory that contains those classes, though. So I shouldn't have gotten any code hinting when I started writing my import statement:
import
At that point, the code hinting window came up, and I got "com" as a suggestion, then "greensock," and so on. But I should not have been getting those hints, because like I said, I had not set my classpath for the folder containing those classes.
So what was going on? For a few minutes, it was a complete mystery. Then I realized my fla file was in a folder that contained other folders that had the greensock classes in them. You always automatically get the current folder as a default classpath. But you do not automatically get the folders that are contained in that. In other words, the import statement will look for classes starting at the current folder, but it won't look any further down into the folders contained by the current folder (those other folders would have to be added to the classpath, too!). But for some reason, the code hinting does look into those other folders!
At first, this led me to believe that my concept of the classpath was wrong, and that you actually could import things from folders two or more levels down from your classpath folder. But nope, it turns out my concept of classpath was completely right, but that the code hinting for some reason will recursively look down into deeper directories from the current one (I had the idea that it might also recursively look into deeper directories from any classpath folder, but when I tested it just now, it didn't. So for some reason, it seems to treat the current folder differently than other classpath folders).
But this means that just because you get code hinting for your import statements, it doesn't necessarily mean that your import statement will work. When I tested the movie, I got to the real truth (and an error message!). The classpath behaves exactly like I've always spelled it out in my tutorials: it (that is, the import statement) only looks for classes whose tree begins in a classpath folder. So I don't know why you get code hinting for classes that are not in the classpath, I had always assumed that if you got the code hinting, you were getting it from the classpath.
I just thought I'd share this here, as a curiosity. I tried to google it, to see if anyone else had ever mentioned it, and I couldn't find anything.