Hi, I’m hoping this will be easy for someone to answer. (I have only just discovered Wick editor).
I run a coding class at school and am keen to create some ‘wow’ factor while demonstrating that writing code can be a much faster way of achieving something.
To that end I want to show them how to how to get something moving across the screen in three ways:
- frame by frame animation
- using a tween
- writing code
I’m fine with 1 and 2 but when it comes to the code I have created a square and edited the script to say:
square.x = 20;
square.x = 300;
square.x = 600;
etc
The issue I have is that the square jumps straight to the 600 position without showing it travelling. I’m guessing its just doing it so fast that it looks like it goes straight to the last position.
Can anyone advise how to get an image travelling accross the screen at a speed that will appear as an animation?
Many thanks for your help