# Organizing library of functions

**URL:** <https://forum.kirupa.com/t/organizing-library-of-functions/304345>\
**Category:** flash\
**Created:** [February 5, 2010, 7:56pm UTC](https://forum.kirupa.com/t/organizing-library-of-functions/304345 "2010-02-05T19:56:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BoppreH](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@BoppreH](https://forum.kirupa.com/u/BoppreH)\
**Post date:** [February 5, 2010, 7:56pm UTC](https://forum.kirupa.com/t/organizing-library-of-functions/304345/1 "2010-02-05T19:56:50Z")

</div>

I have a library of functions to manipulate DisplayObjects. Currently, it’s a class with static methods.

It’s getting pretty huge (the .as file weights 20 kb) and adds over 4 kb to every swf that uses it. Other problem is the organization: I’m obligated to use ctrl+f to find a method to edit and it’s easy to lose myself in that half-thousand lines of code.

Thinking about that, and wanting to remove the ugly class reference that haunts every function call, I found a solution:

- separate the functions in their own source files, like the ones in the flash.utils package.

So, instead of

```auto
import boppreh.utils.Display

Display.setPosition(params)

```

it would be

```auto
import boppreh.utils.display.setPosition

setPosition(params)

```

I thought of extending MovieClip, since virtually all functions require a DisplayObject as first parameter, but it probably would get messy very quickly, full of wrappers for non-MovieClip objects.

What do you think of it? Should I change or not? How do you organize your functions?
