The third tutorial involved making ellipses appear on screen in a random colour when the user holds down the mouse button.
The first optional task was to change the shape from an ellipse to a rectangle. This was very easy, as I was able to type up the line of code again, and Adobe showed me that I could choose ellipse, circle, rectangle amongst some other. The second optional task was harder, and involved adding buttons to let the user choose whether to draw squares or ellipses. While I had some trouble with it, it was more that I wasn’t used to the Actionscript syntax.
Using the mouse buttons is one of the possibilities for controls in a game, with mouse movement and keys (WASD). The Math.random in Actionscript I didn’t know about and could be very useful in some ways.
I have uploaded the flash file here to show it working.