1

I want other programmers' opinions on this. When you program in as3, do you usually use classes? Why?

4 Answers 4

1

ActionScript is an object-oriented programming language, so it is recommended that classes are used to provide modularity to your code freeing up actions and functions in the main timeline. So it should not really be a question whether or not to use classes.

Try reading up on The Lost ActionScript Weekend to give you a crash course on what modularity means in AS3, especially the first section on "Building an airplane"

airplane in flight
- group of interoperating parts based on a set of blueprints
program running
- group of interoperating objects, based on a set of classes

alt text

0

i do.
because it's a great way to create reusable and well organized code

0

Always, because it makes big projects humanly manageable. Also, classes are reusable in any other projects. Object-oriented Programming was not invented for nothing; big projects would be impossible to manage.

0

Yes, even if it just a Main class that represents the main timeline. To be honest, though, every time opt for a minimal one class project and don't use my PureMVC baseline, the project grows and I kick myself. Going full PureMVC on an initially simple project really saved me recently because it took a few left turns and ended up with some rather complex logic. Instead of rewriting everything, most of the new logic involved new notifications (ie, PureMVC events), and reworking who responded to what notifications and when.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.