PDA

View Full Version : Help please



femaletremonti
December 6th, 2004, 11:13 AM
Go ahead and make fun of the noob... point and laugh... but some help would be great too.

Okay, let's say I have an image of my little character facing forwards. I have several other images of him facing different directions (left, right, backwards). I went through most of the tutorial on RPG's so I can make him move with the arrow keys... and I see that I can make the one image rotate... but how do I switch to like... the right facing image when I press the right arrow key so he actually looks like he's walking to the right? Same for left, and backwards...

Any help would be awesome... thanks in advance... links to other tutorials would be awesome too...

JoMan
December 6th, 2004, 11:20 AM
Hi,

Welcome to the Kirupa forums! I am JoMan, here to help :). So, you want to make your mc face different directions, eh? Well, all you need to do is set different frames for your mc and name them, like: walkUp, walkDown, walkRight, and walkLeft. Now, assign some action script:



function moveMc() {
if (Key.isDown(Key.RIGHT)) {
mc.gotoAndStop("walkRight");
mc._x++;
}
if (Key.isDown(Key.LEFT)) {
mc.gotoAndStop("walkLeft");
mc._x--;
}
if (Key.isDown(Key.UP)) {
mc.gotoAndStop("walkUp");
mc._y--;
}
if (Key.isDown(Key.DOWN)) {
mc.gotoAndStop("walkDown");
mc._y++;
}
}

The mc should move and play the certain frames properly. If you need more help, just ask :).

P.S. In the future, you may want to make better titles for your questions instead of 'Help Please'.





peace

femaletremonti
December 6th, 2004, 12:43 PM
Thanks for your help.

Yes, I figured I needed a more descriptive thread title, but I couldn't think of what to call it. Don't know a whole lot about Flash yet... so... don't know too much terminology yet lol I'll work on it though. And thanks again.

JoMan
December 6th, 2004, 01:01 PM
Thanks for your help.

Yes, I figured I needed a more descriptive thread title, but I couldn't think of what to call it. Don't know a whole lot about Flash yet... so... don't know too much terminology yet lol I'll work on it though. And thanks again.
Your welcome :).





peace

femaletremonti
December 7th, 2004, 01:06 AM
I think it's cause I'm stupid... but... I can't get it to work. He just spins around in a circle. :(

JoMan
December 7th, 2004, 04:17 AM
May I see your fla (flash file)? Maybe I could find out what is wrong from that?