I’m working with the “Movement Using Keyboard Keys” tutorial, question is this: I am looking to have the image ease to position so I was trying this syntax:
on (keyPress “<Up>”) {
speed=10;
if (holder._y>-300) {
holder._y -= holder._y/speed;
}
}
Works great for one arrow but disables the others??? any help???
thanks.
my code:
on (keyPress “<Up>”) {
if (holder._y>-300) {
holder._y -= speed;
}
}
on (keyPress “<Right>”) {
if (holder._x<0) {
holder._x += speed;
}
}
on (keyPress “<Down>”) {
if (holder._y<0) {
holder._y += speed;
}
}
on (keyPress “<Left>”) {
if (holder._x>-300) {
holder._x -= speed;
}
}