In this example kindly provided by AP Khoza a simple game where user has to guess behind which door a prize is hidden is provided. The code implements an array of components [Outside of the scope of the CAPS, but usable in a PAT] and the dynamic creation of images to represent the doors.
Thank you Aubrey
PDF document to accompany the code available here: PDF
Complete code for the game, available here: CODE