Today I was able to find the actionscript that created a timer. If Pebbles is neglected for 30 seconds (I used this short time-span so that I could show this when presenting it in class. If I was to make this product for use in real life then I would make this time longer.) If the buttons on the main interface are not touched for 30 seconds then the happiness-ometer loses 2 points. Here is the coding for the timer:
ACTION SCRIPT!!!!