Yes, there is a built-in way:
Subclass Morph and implement two methods
- stepTime (time between steps in milliseconds) and
- (sent to the morph at regular time intervals)
Minimal example:
Morph subclass:
instanceVariableNames: ''
classVariableNames: ''
category: 'MovingMorph'
MovingMorph → stepTime
stepTime
^ 100
MovingMorph → step
step
self position: self position + (1@1)
Now open MovingMorph in the world ( MovingMorph new openInWorld) and control the animation with startSteppingand stopStepping.
source
share