It actually took me a little while to get that working in some fashion. But it wasn't acting the way I wanted. When I press and hold a key, it repeats the guyMove function as if I held down a key when I was typing. It would run once, and moments later, run constantly.
I was kind of looking to get a toggle effect going. So it would trace once when I press, and once when I release. Or even simpler if I could combine into one function and actually trace the press and release without the repeating press trace if I hold the key down.
************EDITED**********************
I am starting to understand it better, thanks you.
I wanted to know something else as well, :P.
If I wanted to make it recognize when you are pressing more than one thing, that wouldn't work, would it? I'm pretty sure it will only recognize one key press at a time.
I was thinking of setting up different functions for each key that may be pressed, and keep the guyMove function listener active all the time. So if I pressed right it would go to the moveRight function. Then if I pressed spacebar, it would go to moveSpace function.
Do you think that would work?
******************************************
I actually found the answer to that last question, and now I have a problem with the walls MC.
What happens is, I put a few MCs inside that walls MC
, but when I get to a certain number of them, my code stops working. I can't figure out why for the life of me... I've moved it around to see if it was the placement. But it just doesnt work with a certain number of MCs... Would there be some kind of confusion with the childAt() function I'm using???
Thanks again,
~Bill Ludwig
P.S. I attached the fla to show you what I am talking about...
Last edited by thekillerbigmac; 04-27-2009 at 03:05 PM.
Reason: New question, attaching file