Travels

Tuesday, September 30, 2008

A couple small tips

Recently I had a problem with tweens not completing their animations. I did some testing and found the reason that my tweens were stopping was that they were prematurely garbage collected. The way to fix this is to store a reference to them in a global variable (I used a dictionary). Since the dictionary is a global variable it is not garbage collected, there is always a reference to the tween so it is not garbage collected.

Another small problem I've encountered involves using movie clips as buttons. In order to get the hand icon to appear when the cursor mouses over the movie clip be sure to set the move clip's buttonMode=true.

No comments: