Actionscript files vs. Actionscript classes or packages

Dan
Dan used Ask the Experts™
on
I'm pretty new to actionscript and flex development.  I'm more of a .net programmer but flex seems to be better suited for the project at hand.  That being said I have a pretty simple question.  This should be an easy 500 points for somebody.

When using flexbuilder I see the option to add a new actionscript file or a new actionscript class to the project.  What is the real difference between the two?  I mean I understand OOP and such but are there any guidelines for determining which is best to use when and why?

I've googled without any clear answers here.  Would appreciate your input.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Honestly, I have never used ActionScript File option...  I just tried, and it seems like just creating a new file with the given path/file name...  Basically exactly the same as New > File option...  So, I'd probably use this option if I need to create a config file or such that's not really a class file...  Of course, I won't create config.as rather, I'll create config.dat or something...  In other words, I don't really see a point of having that option right there when you can do the same thing with New > File option...

On the other hand, ActionScript Class option is the one that you'd normally use to create a class file from the template...

CyanBlue
DanNetwork Engineer

Author

Commented:
So then there is no real difference except that one is declared as a package and the other is not?  One is recognized as a class and the other isn't ... basically?

Commented:
That's the only difference I see...

CyanBlue
DanNetwork Engineer

Author

Commented:
hmmm ... ok I think I get it now then.  If I create it as a class file then I have to instantiate it.  If I create it as a file then I can just include it ... ok that helps.  Thanks Man!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial