Programming ActionScript 3.0 |
|
|
|
| Getting started with ActionScript > Creating your own classes > Suggestions for organizing your classes | |||
Unlike previous ActionScript versions, ActionScript 3.0 does not have the one file, one class restriction that limits you to using only one class per file. Using ActionScript 3.0, you can save the source code for more than one class in a single .as file. In some cases, it might seem more convenient to pack multiple classes into a single source file, but in general, this is considered a bad programming practice, for a couple of reasons:
For these reasons, Adobe recommends that you always save the source code for each individual class in its own file, and give the file the same name as the class.
|
|
|
|