Skip to main content
Inspiring
February 11, 2010
Answered

Very basic noob question about class fundamentals

  • February 11, 2010
  • 2 replies
  • 534 views

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.

This topic has been closed for replies.
Correct answer kglad

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

2 replies

emil emilAuthor
Inspiring
March 1, 2010

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

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
February 11, 2010

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

emil emilAuthor
Inspiring
February 11, 2010

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?

kglad
Community Expert
Community Expert
February 11, 2010

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.