Spark image

Pick up a scaled engine and carriage

This apparently simple animation shows the use of encapsulation to store a complete engine and carriage, wheels and all, that can then be loaded into an animation. The engine and carriage are stored separately for later use.

In the code there is the possibility of changing the size of the train by altering scaleX.





 
 
 
© Keith Gibbs and John Bourne 2015