Categories
ActionScript

Import statement and code hints

Unlike the include directive, the import statement in ActionScript 2.0 requires a semi-colon at the end for code hints to work.

For example, without the semi-colon, code hints for the Accordion class is not displayed:

import mx.containers.Accordion
var ac:Accordion;
ac.

Code hints now work:

import mx.containers.Accordion;
var ac:Accordion;
ac.

Note that with or without the semi-colon, the class is still imported.

3 replies on “Import statement and code hints”

codes hint can be used with the others class (just like TDragDrop <==== i created myself)or not?
I have to re-open that class again and again for its properties and functions. I think that if flash editor can do that i will …….(^o^)/

I’d appreciate an answer to kakarin’s question as well.
Code hints for built in classes are nice, but it’s
frustrating that I can’t seem to turn them on for
my own classes.

The class is obviously being imported, since the
methods are called, verified by a trace statement-
what I wrote

import Kingdom;

var myKingdom:Kingdom;
myKingdom = new Kingdom();

myKingdom.dosomething();

In publish/settings and in document/prefs I added the classpath to the Kingdom.as file

Leave a Reply to Dave Yang Cancel reply

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