# Class code layout

**URL:** <https://forum.kirupa.com/t/class-code-layout/320888>\
**Category:** flash\
**Created:** [April 5, 2011, 12:09am UTC](https://forum.kirupa.com/t/class-code-layout/320888 "2011-04-05T00:09:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sk138](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@sk138](https://forum.kirupa.com/u/sk138)\
**Post date:** [April 5, 2011, 12:09am UTC](https://forum.kirupa.com/t/class-code-layout/320888/1 "2011-04-05T00:09:54Z")

</div>

I have been learning a lot in AS3 with creating classes. I was wondering if there are any standards for class organization.

Currently, I put my imported packages first, followed by the class definition.

Next, I do any private variables, then public variables declarations.

After the variables, I have my constructor, then I do private functions, followed by public functions.

This seems to work okay but sometimes I still find myself searching through my code for stuff when I feel like there should be a better way.
