I am making a game which has several objects (beds, crates, tables) that can be placed on a grid.
The objects are created in flash and exported as individual .swf files. Each object can be rotated. To do this I create 4 frames in each .swf and draw a different version of the image in each frame. This allows me to 'rotate' an object in actionscript by simply going to the next frame of the swf movieClip.
This simplifies things a lot for me, as it follows logically that an object will have one image file (swf) for all orientations. However, I've hit a problem in that I would like the object to have an animation. Does anyone know if there is a way to do this? or perhaps another technique I could use.
Instead of having 4 frames each with a different rotation, just change the rotation property of the object.
If you create the object in one frame as an animation in your currewnt design, then it will still animate if you change its rotation manually and have it in four different frames.
I think It's best to explain with an example. Let's say I have a television that I draw in four different frames with different rotations. The first frame has the television facing in a south west direction. The 2nd frame has a south east facing television and so on. This is what I have at the moment. What I'm wanting to do next is add an animation to the television, e.g. display something moving on the screen.
You still have not explained what problem you are having with implementing such an animation. You can create an animation as a separate movieclip and place it within any or all of the 4 frames or within the objects within those four frames.
Europe, Middle East and Africa