PDA

View Full Version : [AS3] movieclip character animation troubles


Darksydaz
09-24-2009, 04:31 PM
ok... i have one huge issue... I'm using a movieclip with several movieclips as part of my animation. Each one has a frame label and is referenced to by the script.

http://img.photobucket.com/albums/v304/DarkSyDaZ/Picture3.png
inside the movieclip"Aurora"

the Code below works on a key press function... which is on a EnterFrame function. I'm assuming that's why it's seemingly stopping on the first frame. but i don't know what i could use to make it animate smoothly (like make it animate the rest of the frames.

function Controller2(e:Event) {
if (keyui.isDown(up)) {

} else if (keyui.isDown(down)) {

}
if (keyui.isDown(left)) {
Xmotion = 0-wSpeed;
cWalking = true;
Rdirect = false;
if ((Rdirect == false)||(cWalking == true)) {
charaMove();
}
} else if (keyui.isDown(right)) {
Xmotion = wSpeed;
cWalking = true;
Rdirect = true;
if ((Rdirect == true)||(cWalking == true)) {
charaMove();
}
} else {
Xmotion *= xFric;
cWalking = false;
if ((Rdirect == true)||(cWalking == false)) {
charaMove();
}
}
}


function charaMove():void {
if (cWalking == true) {
if (Rdirect == true) {
Aurora.gotoAndPlay("aurwkrt")
} else {
Aurora.gotoAndPlay("aurwklt")
}
} else {
if (Rdirect == true) {
Aurora.gotoAndPlay("aurrt")
} else {
Aurora.gotoAndPlay("aurlt")
}
}
}

Anyone with Animation tips for moving and showing animation in characters, please let me know... :), i'm stuck here... :( if examples are needed then i'll post one...

Darksydaz
09-25-2009, 12:28 AM
OK... i've done alot more research... and what i'm looking for is called states... i'm trying to change the state of the character, each one has a 6 frame animation, and it's stuck running the first frame. I'm working on creating my own engine and i'm trying to change the state of the character as buttons are pressed...

If someone could lead me to a tutorial or offer support on this subject, it would be much appreciated... thank you...