# How to make a stuktur in a projekt

**URL:** https://forum.kirupa.com/t/how-to-make-a-stuktur-in-a-projekt/265677
**Category:** flash
**Created:** [July 11, 2008, 8:41am UTC](https://forum.kirupa.com/t/how-to-make-a-stuktur-in-a-projekt/265677 "2008-07-11T08:41:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![peterco](https://avatars.discourse-cdn.com/v4/letter/p/7feea3/32.png) [@peterco](https://forum.kirupa.com/u/peterco)
#### Post date: [July 11, 2008, 8:41am UTC](https://forum.kirupa.com/t/how-to-make-a-stuktur-in-a-projekt/265677/1 "2008-07-11T08:41:44Z")

</div>

I need a tip on how to organise a AS3 projekt. I understand the idea of putting the code in classes. But what do I put in the same class and when do I separate the code in differnt classes? And what is the smartest struktur for the packages?

---

<div class="post-metadata">

### Author: ![Sage\_of\_Fire](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@Sage\_of\_Fire](https://forum.kirupa.com/u/Sage_of_Fire)
#### Post date: [July 11, 2008, 1:09pm UTC](https://forum.kirupa.com/t/how-to-make-a-stuktur-in-a-projekt/265677/2 "2008-07-11T13:09:51Z")

</div>

Oh, you’ll know. For example, say that you have a virtual zoo video game that you’re designing. You’ll want to have separate classes for the zoo itself and all the different animals. That way, to make a another animal object (an instance of an animal class), you just have to do something like var newAnimal = Elephant(), vs. rewriting the Elephant code.

As far as structure (stuktur, suktur, struktur) goes, I assume you’re talking about file structure. The traditional way to organize Actionscript is to put all your swf files in your top-level folder (let’s call it root), then put your classes into another folder. Most people put them in a file structure that’s the reverse of their domain name. For example, if your code makes a slideshow program for the site [www.somerandomsite.com](http://www.somerandomsite.com), your path to the classes would look like this: root/com/somerandomsite/slideshow/. I don’t know why people do that, but that’s the standard. I hope this clears things up for you!

---

<div class="post-metadata">

### Author: ![dthought](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dthought/32/3573_2.png) [@dthought](https://forum.kirupa.com/u/dthought)
#### Post date: [July 12, 2008, 12:15am UTC](https://forum.kirupa.com/t/how-to-make-a-stuktur-in-a-projekt/265677/3 "2008-07-12T00:15:19Z")

</div>

> [@Sage\_of\_Fire;2356855](#):
>
> I don’t know why people do that, but that’s the standard.

Because only one “company” can own said domain name, thus guaranteeing its “uniqueness”. This is why Adobe uses [adobe.com](http://adobe.com), or, in structure terms, /com/adobe/…

They’re pretty much guaranteed that since they own the [adobe.com](http://adobe.com) domain, no-one else will write classes in the com.adobe …hmm, the correct word escapes me, so let’s say scope.

That means that /net/whatever/ would be written by the person who owns [whatever.net](http://whatever.net) - nothing to do with networking 🙂

---

<div class="post-metadata">

### Author: ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)
#### Post date: [July 12, 2008, 12:17am UTC](https://forum.kirupa.com/t/how-to-make-a-stuktur-in-a-projekt/265677/4 "2008-07-12T00:17:57Z")

</div>

… which is why most of my classes are located in /junk/

: )
