Groups | Blog | Home
all groups > flash actionscript > june 2004 >

flash actionscript : Avoiding stupid mistakes?


Maskus
6/6/2004 8:54:10 PM
Good evening, esteemed scripters!
First of all, I would like to apologize if this post isn't exactly a perfect
example of how to use english, but it's not exactly my native tounge. I hope
you won't judge me to harshly. :)

Anyway, down to buissness.
I have been interested in quite a long while on doing a flash-based fighting
game, featuring some coworkers. You know, something that'll amuse the folk's at
the office during a couple of coffe-breaks, and such. I have some ideas of how
to do it, and i know that the graphical part isn't ap problem. However,
although I am somewhat familiar with Actionscript, I'm not sure how to
structurize a project like this so that it won't be nearly imposible to script
the bigger it gets. I'm mainly used to making presentations and small
click-and-play arcade games.

What I'm aming for this time is a game with basically the same structure as
this one:
http://www.adultswim.com/games/inuyasha_demon/index.html

I would really appreciate if someone could help me to create the basic
structure shell, so to speak. Just so that I won't get entalgled in scripting
that could have been done much smoother and more modular...

Oh, and I use Flash MX and Mac OS X.

Thanks a million in advance!

/Gabriel Fors?n
Designer/Writer
redboxinteractive
6/6/2004 9:58:56 PM
OK, flash is my only language, so you would probably get a better answer from a
trained csi guy, but ill give it a crack.
I typically have a few structures I set up to help with organization. (btw, I
havent learned as2 yet so may be better ways of doing it in as2)
1. _root.vars - this is an empty movie clip I make and instantiate as
"vars". used to store variables so you know where they are.
2. _root.functions - like _root.vars but stores all my functions on first
frame so all are loaded up at the start.

This said, I would find out if you have some objects (such as characters) that
should have a different set of methods for themselves such as different
reactions or handeling of information, different variables (ie bonuses of
strength, dex, etc for that character) and if this is a signifigant issue I
would establish seperate vars/functions clips inside those characters. It just
helps me know where to point to all the time and keeps things close to in one
spot.

As for animations, It would be easier to have all animations start and end
with the same pose. have an animation controller movie clip that has a "punch"
frame, which when gone to will que off all the various body parts to go to the
appropriate frames with the animation of that part for that action. then, when
you want to call a punch action just tell your animation controller object to
gotoAndPlay("lightPunchRight");

Thants my 2 cents, would be interested to find out what everyone else has to
say on the matter.
-RedBox
AddThis Social Bookmark Button