View Full Version : Sprite Sheet/Tile Sheet
Tivoilos
06-23-2008, 12:17 AM
Is it possible to use a Sprite Sheet or a Tile Sheet with Flash an not have to put every single Frame into the Stage Frame thingy??
Meaning I can use a sheet an do this
|Walk 1|Walk 2|Walk 3|Walk 4|Attack 1|Attack 2|Sit 1|Sit 2|Spell 1|Spell 2|
An when programming use the X Y values of the Frame area like
Walk 1= 0, 0 Walk 2=0, 1 Walk 3=0, 2 etc etc
Any help will make me very happy ^_^
GMaker0507
06-27-2008, 03:35 PM
Depending of what version of flash your using you can use the Bitmap and BitmapData Classes
BitmapData has the 'Draw' function which can:
Draw the entire display object (MovieClip, Shape, Graphic, Bitmap)
or
Draw a certain section of it using its Rectangle Parameter
What i did before. I had it so each of my characters animation frames were line left to right, and each of their actions top to bottom
Action 1 Frame 1 - Action 1 Frame 2 -Action 1 Frame 3
Action 2 Frame 1 - Action 2 Frame 2 -Action 2 Frame 3
Action 3 Frame 1 - Action 3 Frame 2 -Action 3 Frame 3
etc
Then i used the bitmapData class to cut and draw my desired rectangle area out of that sprite sheet
ReSearch BitmapData
Tivoilos
06-27-2008, 04:27 PM
I'm using AS2
GMaker0507
06-27-2008, 05:44 PM
You can break each action down into its own mc
Then put all the mc's on the characters mc, and label each frame after them
Then you could use the code to show them.
this.gotoAndStop(Action)
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.