Thursday, January 6, 2011

Adding A Timer

I am by no means an expert at flash, but I have found out quite a few things on my journey through Globaloria. Lately, I have been working on my timer while wrapping up my game. For starters, don't always listen to the Globaloria wiki. The website often recommends that you go search for information, and they're right. Some sites are much more helpful.
Adding a timer is not hard at all. In order to ensure the presence of a timer, make sure to add the timer on the top layer. After drawing your text box in the given location, make sure you select dynamic text and click the embed button (I use CS5). For a timer, select numerics when the window pops up. Then, you can rip the code from the wiki, supplying your own numbers and adding a stop code at the end. When telling the countdown timer where to go when it runs out, use a frame number instead of the title, for it makes life simpler. The only thing that still eludes me is how to make my timer stop if you move on to another scene while time is ticking. If I ever figure this out, I'll let you know.

No comments:

Post a Comment