kadaj
May 19th, 2009, 09:08 AM
When beginning without any key pressed the ryustance_mc plays as it should.
When right or left key is pressed the ryuwalk_mc plays but the ryustance_mc plays at the background. How to remove it from the holder?
The thing is when I stop pressing any of the keys then ryustance_mc must play again.
function control(event:Event):void
{
if(rightKeyIsDown) {
holder_mc.addChild(ryuwalk_mc);
ryuwalk_mc.play();
holder_mc.x += speed;
}
if(leftKeyIsDown) {
holder_mc.addChild(ryuwalk_mc);
ryuwalk_mc.play();
holder_mc.x -= speed;
}
}
initializeGame();[/code]http://i42.tinypic.com/2utrh41.jpg
Please help me.
Thank You
When right or left key is pressed the ryuwalk_mc plays but the ryustance_mc plays at the background. How to remove it from the holder?
The thing is when I stop pressing any of the keys then ryustance_mc must play again.
function control(event:Event):void
{
if(rightKeyIsDown) {
holder_mc.addChild(ryuwalk_mc);
ryuwalk_mc.play();
holder_mc.x += speed;
}
if(leftKeyIsDown) {
holder_mc.addChild(ryuwalk_mc);
ryuwalk_mc.play();
holder_mc.x -= speed;
}
}
initializeGame();[/code]http://i42.tinypic.com/2utrh41.jpg
Please help me.
Thank You