All we need to do now is display the time in your clock window. To do this you will need to select the Text Tool and draw a text box large enough to fit in the clock window. You can type in any time format to allow you to choose the size and type of font you want to display in the final clock.
You will now need to alter the properties of the text box by selecting the text box and then go up to the menu and click on Text > Properties. This will open up the properties pop-up window.
With the Text Options tab selected, click the drop-down box and select the Dynamic Text option (obviously we will want the clock to tick). Leave the Single Line selected and below that type in the variable name 'displayTime' as this the variable name we have declared in the actionscript.
Next, add another keyframe to the Timeline at frame 2 by copying frame 1 into it. Double-click on frame 2 to open up the Frame Actions editor again.
This time we need to add a loop to count the seconds so you will need to carry out the following:
In the script editor select 'Basics' from the sub menu by double-clicking on it. Next, click on the property 'Go To'. By default the check box should be checked 'Goto and Play' and the frame number should be 1. In this case that is what we need so you should save your work at this point.
Press Control + Enter to test the movie and you should see the clock ticking away displaying the correct time (or the time that you have running on your PC).
Save your work.
You could of course make the clock more functional by adding a date feature or even an alarm. Maybe that's something we'll get into in a later tutorial.
|» Level Intermediate|
Rating: 8 Votes: 98
|Download the files used in this tutorial.|
|Download (161 kb)|
|More help? Search our boards for quick answers!|