If you want to be able to move an object around the screen yourself, whenever you feel like it, you can! You can make use of key presses to achieve this.
When editing an element, choose the "adv" option and enter the following code;
if (Key.isDown(39)==true) { this._x++;}
to move the object left using the left arrow. Change the key number for other keys, and change the x and y values to alter the movement. Make sure EACH timeframe has the "adv" code within it.
The key codes are Enter Key (13), Space Key (32), Left Key (37), Up key (38), Right Key (39), Down Key (40), 0 (48) - 9 (57), A (65) - Z (90)
To move left use x--, to move right use x++, to move up use y--, to move down use y++
Recent Comments