• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Very basic noob question about class fundamentals

Valorous Hero ,
Feb 11, 2010 Feb 11, 2010

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.

TOPICS
ActionScript

Views

381

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 11, 2010 Feb 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).

Votes

Translate

Translate
Community Expert ,
Feb 11, 2010 Feb 11, 2010

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Feb 11, 2010 Feb 11, 2010

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2010 Feb 11, 2010

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 01, 2010 Mar 01, 2010

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines