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?
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, 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!
Because only one “company” can own said domain name, thus guaranteeing its “uniqueness”. This is why Adobe uses adobe.com, or, in structure terms, /com/adobe/…
They’re pretty much guaranteed that since they own the 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 - nothing to do with networking
… which is why most of my classes are located in /junk/
: )