# When to use OOP in ActionScript?

**URL:** <https://forum.kirupa.com/t/when-to-use-oop-in-actionscript/222175>\
**Category:** flash\
**Created:** [April 11, 2007, 12:36pm UTC](https://forum.kirupa.com/t/when-to-use-oop-in-actionscript/222175 "2007-04-11T12:36:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arckodrazen](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@arckodrazen](https://forum.kirupa.com/u/arckodrazen)\
**Post date:** [April 11, 2007, 12:36pm UTC](https://forum.kirupa.com/t/when-to-use-oop-in-actionscript/222175/1 "2007-04-11T12:36:09Z")

</div>

Hey ActionScripters

I’m having some problems to get myself programming OO in ActionScript. I’ve learned Java/OO/Design Patterns at school so I know how OO programming works but I’m having troubles with using this technique in Flash which is rather different to Java (Swing).  
The documentation on the Kirupa website give me a lot of information but a lot of principles I already know from Java.

My exact question is: when do I have to use OOP in Flash?  
I think the best way to answer this is that you guys reply to this thread if, in some particular situation, I have to user OOP or not.

Why? Because I can’t find good examples on the internet of a simple OO-flash-app/site.

Current situation: I have a background image that has 6 different instances on the Stage (all with a different hue and a name like: back\_xx\_mc (where xx = the number)). This allows me to tween between them so that they give the effect of a constantly changing background.  
At the moment it is programmed procedural. But should I use classes?

Do I have a background.as class then that has … (what? :p)?  
Do I have a backgrounds.as class that has an array of background.as-instances?

Thanks in advance.
