Copy link to clipboard
Copied
I'm looking at this line of code:
import flash.display.MovieClip;
and realized that I haven't seen yet anything else used instead of the word flash. in such lines. This made me wonder what it means. Is there other possible alternatives?. If yes, what could it be? If no, why this has to be included all the time when it is obviously the only choice?
Sorry for the noobish question but if it takes a quick explanation I will really appreciate it.
Thank you.
that's the path to the MovieClip class (relative to the default path). and yes, there are other initial paths like fl (check the videoevent class).
Copy link to clipboard
Copied
that's the path to the MovieClip class (relative to the default path). and yes, there are other initial paths like fl (check the videoevent class).
Copy link to clipboard
Copied
Thanks kglad,
May I ask another question along these lines. As far as I understand it each class is a separate file and I wonder if the internal classes are actual separate files that I can access on my computer?
Copy link to clipboard
Copied
yes, you can but under no circumstance should you change any of the internal classes. you can copy the code, rename them and do all sorts of fun things, but don't change any.
search in your install directory for MovieClip.as, for example.
Copy link to clipboard
Copied
Hi, I'm bringing this question again because I'm still not quite sure what exactly a path in action script is.
If I create my own class and put it in a subfolder structure then my path may look like this:
import myfolder.mybars.NavigationBar;
But looking again at this example:
import flash.display.MovieClip;
all I know is that MovieClip is a class that I can find defined in the file MovieClip.as in a subdirectory inside the Flash programs folder.
However I'm not sure what flash and display words in that path are. They do not appear to be a folder directory path where MovieClip.as file is.
In the language reference flash.display is listed as one of the packages which doesn't appear to be a folder structure like the one I can create myself for my classes. I'm not sure what kind of path flash.display.MovieClip is? It is not a folder path, right? Is it some sort of packages path defined internally in Flash?
I appreciate your patience with answering my dummy questions