What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
First off, I’d like to begin with saying I understand most programming concepts, but I only have some experience with AS3.
I know there are many ways to set up class files with your game, but how do most people do it? I can’t seem to find one solid explanation on the best way to set it up.
Previously I created .as files for every object, brought it into the stage with code then continued. If I have learned correctly, should I create a document.as which brings in menus, main, and other part of the game? Any advice helps. If there’s any links that sort of explain this go ahead and link it.
I use FlashDevelop, so my experience is probably very different from yours, but the way I do it is that I set up all my project-specific classes in the src/ directory of the project, and I also add another folder in the class path. That one, which I call without much originality ‘Common classes’, is where I keep all the stuff I reuse between projects: My bare bones Page class, which I extend to make the various screens (title, credits, options, level selection, game, etc…) in the game, a PRN generator, and some general-purpose custom objects (an ‘Animation’ class, for instance, which handles most of the legwork for blitting).
I can’t answer for “most people”, but I hope this helps.
By stage code you mean coding on the timeline right? Yeah thats gonna mess up your classes big time and its really not necessary.
If you’re gonna use flash make sure you avoid layers and timeline code. From what Ive gathered, if you construct your fla file correctly your game will have only one layer and at most 2 frames.
Adobe flash, yes. I don’t code on the timeline in actions, everything in one layer, one frame, separate class files for each object. I was just curious on how other people do things.
One question I do have though is how to set up different menus with a game. Assuming just make each menu a separate class that does things only in that menu, then use the “main” or “document” class to bring all of them together with events.
I find myself wanting to help you, but I’m not sure if I understand what you’re asking. When you say menu do you mean a menu screen like with a play button, settings button, etc. ? Or are you talking about different elements of some kind of HUD within the game itself?