Hi Jon,

I have a similar application that I wrote in ActionScript w/ mtasc. I have a class that corresponds to your app.as class. I do all of my imports there. The app.as class instanciates the map.as and all of the UI stuff. Since I didn't use the IDE, my app.as class has a main method. I used an event model similar to the Java swing event model to control what happens when files load or buttons are clicked. I don't know if any of that is useful. You can look at the app here:

http://www.flashmaprealtor.com/

Disclaimer: I didn't design the page it is in. :(

Good luck,

Kjel

Jon Bennett wrote:
Hi,

I'm working on my first commercial AS2 project. It's pretty simple,
it's an interactive map, but really only a couple of classes at the
moment, but I think I could split them down a bit as in my previous
AS1 projects, I would have have broken things down into smaller
classes, that each listen to each other (and broadcast events etc).
Which brings me to my point, I'm a little confused as to how to tie my
classes together.

I have one class which is my menu, this is basically an accordian
style menu, which uses the FuseKit library for animation. I then have
a Map class, which is the graphics of the map, which also uses the
FuseKit class to control it's zooming. Both of these classes are
driven by the same data set, a single XML file, which I'm parsing into
an Object using Sepiroth's xml2object class.

Whilst testing I've been importing my classes etc from the same
location as my fla, using an .as file, but I now want to move all this
logic in an AppController class, which loads  handles all the imports,
parses the xml, instanciates my objects etc, but I've having some
trouble doing so.

If I have 3 classes: App.as, Map.as, Menu.as - should I only import
App.as in the first frame of my movie, and let the App class import
the classes it requires, or should I  import all required files
manually? Whichever way I do it, how can I place my files in a sub
directory in the folder I'm working in (like 'classes')?

Both Map.as and Menu.as use the FuseKit classes, do I need to import
them for each class, once in the App class or once in the first frame.

If this is all a bit hypothetical, I'll post some code ;)

Thanks in advance!

Jon


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to