AS2 OOP: Class File Management
         by senocular  

Introduction
The easy part is learning how to create classes for ActionScript 2.0. Easy-peasy lemon-squeezy. Now its time for the hard part - managing them. The difficulty is not so much in your own personal organization, though that can certainly factor in, but more in understanding how Flash accesses and reads those external class files of yours.

One thing you can do is take the safe route. Keep all your classes all bundled together in with your main movie .fla file. By default, Flash looks in the current directory for all class files. Should you keep them all there, all class files will be recognized by Flash and your movie should work without a hitch.

It's not always as easy as that. When you're dealing with a lot of files, you'll want/need to start subdividing those classes into groups and keep them within their own functioning directories. Also, if using code provided by another source, such as Macromedia, you may need to be familiar with these methods of organization and access. Besides, like much of ActionScript 2.0, this will help you become a better programmer.

With ActionScript 2.0, Flash allows two means of handling file organization. One is through using the classpath, and the other is by creating class packages.

 

 




SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple.