PDA

View Full Version : Animation with 4 diff directions in one file


MaestroS
03-17-2008, 04:41 PM
I got this character set:
http://img410.imageshack.us/img410/6061/fightervu9.png

The question is, how to implement walking:
- down (characters in yellow border)
- left (characters in red border)
- right (characters in green border)
- up (characters in brown border)

and when player is not walking, then is set first character of direction in which this character is.

Oh! I'd forget:
How do you make modal windows, for example for shops, NPCs talking ? Just to not do anything except clicking in window area.

Durnus
03-17-2008, 06:54 PM
This is a very open-ended question, so I can't give you one answer. (Especially to your second question.)

First of all, it depends on the version of Actionscript you're using. I'm going to answer using AS3.

I woud suggest using several bitmapdata objects, and cycling through them by changing the visibility of several bitmaps, each pointing to a different section of the animation. By switching through each frame of the animation at a certain speed you can make it look like it's walking. (No offense, but with those images good luck making it look like it's walking.)

To separate the image into multiple images you would copy over rectangles of pixels from the image you have into each bitmapdata object that will hold the data.

Good luck... sorry I couldn't answer your question.

fnx
03-17-2008, 06:58 PM
Try this link, it should be what you're searching for!

http://labs.hexagonstar.com/animatedbitmapclass/

It's an animated bitmap class for actionscript 3.0.

MaestroS
03-18-2008, 09:25 PM
For sure, I'm using actionscript 2.0 ...

Anyways, can you provide any links regarding to animating bitmaps such mine ones and switching them ?