all groups > flash actionscript > april 2005 >
You're in the

flash actionscript

group:

Action Script Help


Re: Action Script Help Byron Canfield
4/15/2005 10:15:48 PM
flash actionscript:
mvcYourObject._xscale *= -1;

--
--------
Reality will not be altered to comply with preconceived notions.

Byron "Barn" Canfield
Flash example files: http://www.canfieldstudios.com


[quoted text, click to view]

Re: Action Script Help Armality
4/16/2005 12:00:00 AM
Re: Action Script Help mandingo
4/16/2005 12:00:00 AM
put a condition in the first part of your function or keyPress handler...

isCharacterFacingLeft = false;

if(Key.isDown(Key.LEFT)){
if(isCharacterFacingLeft){
// he is already facing that way so just move normally;
}else{
// turn it
mvcYourObject._xscale *=-1;
isCharacterFacingLeft = true;
}
}

something like that could get you started...
cheers
Action Script Help Armality
4/16/2005 12:00:00 AM
Can someone please help me with some action scripting. i am having trouble
trying to make an object flip horizontaly when you press a key in my case i am
making an interactive game and when you press the left or right key i want the
caracter to face that way. and i dont know what the tag is.
Re: Action Script Help Byron Canfield
4/16/2005 10:52:08 AM
Well, yeah, but that's all you asked for, the code to make it flip. Thus the
importance of being clear in your specification.

See Mandingo's reply, which includes a conditional.

--
--------
Reality will not be altered to comply with preconceived notions.

Byron "Barn" Canfield
Flash example files: http://www.canfieldstudios.com

[quoted text, click to view]
in my game it is what makes you go either holding left or right. any other
suggestions would be great. thx

AddThis Social Bookmark Button