ForumsProgramming ForumAnimating a character

1 3895
ImarCab
offline
ImarCab
6 posts
Nomad

Hi everybody,

I've been learning actionscript from tutorials and some book since I registered this page a couple of weeks ago, and I've been able to make a working checkers game wich shows all my adquired skills.

Now I think I'm ready to make the next step and try to make a platform game (after the exams next week) and I was wondering how can you deal with all the animations of the same character (jump, walk...), do you must make a new symbol for each and then removeChild/addChild and give the new one all the properties from the old? (I hope not).

And just one last question, is it better to program in the timeline or making a Class for each symbol?
Thanks a lot!

  • 1 Reply
ImarCab
offline
ImarCab
6 posts
Nomad

Well, I will answer myself and get the points...

I found a solution, based in adding all the animations in the same object timeline (e.g.: frames 1-24 running, frames 25-49 jumping...) and when doing that action, call the first frame (1 when running and 25 when jumping) and at every new frame use a listener to see if the current frame is the last (24 or 49) and jump into the first of that action.
You must have a list to remember the corresponding frames but it works. I also found out that as3 is made to work by classes, so I supose that is better than in the timeline (but it also can be done to make short tests).

Showing 1-1 of 1