For autumn and winter I had said in my specification that I would like to have animations during them. In winter I have added snow falling and in autumn leaves floating.
I have a fair idea of how to do this from processing. I researched the code for AS, and found a great example on stackoverflow.com the tutorial “Generate random falling objects in AS3“. Using this code I manipulated it to give me the effects I wanted for my snow falling from below 0 on the X axis and changed it again for the leaves below 0 on the Y axis.
A problem I have now is that the snow and leafs remain to come onto the stage when the user navigates away from either the autumn or winter screen. I added in a boolean for the snow and leafs. I thought that this would be a good way of removing them, if the navigations are selected then change the boolean to false and have this set up that if boolean equals false use the removeChild function to remove the snow/leafs from the stage. This didn’t work. It only stopped the leafs/snow from adding to the stage but it did not remove what was already on it.
After speaking to ken he advised that I make and array for the snow and leafs. From this array I could make a function where you can remove the leafs/snow from the stage when the user navigates from the autumn/winter screen.
This worked really well and gave me the result i wanted.