Forums

ForumsProgramming Forum

Animating a character

Posted Oct 20, '11 at 1:20pm

ImarCab

ImarCab

4 posts

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!

 

Posted Oct 22, '11 at 5:59am

ImarCab

ImarCab

4 posts

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).

 
Reply to Animating a character

You must be logged in to post a reply!