|
|
Making a simple digital clock in FlashIn this Macromedia Flash tutorial you will see how to make and program a simple digital clock in actionscript. 1. 2. 3. click the new movie clip and go to the action script panel. 4. This is acturlly pretty straight forward, eventhough it seems confusing. onClipEvent (enterFrame) { I will break the code up into pieces. onClipEvent (enterFrame) { this is the container of the code, this will update the code so we get the current time updated. data = new Date(); here we declare an object to be of the type date time1.text = data.getHours() + ":" + data.getMinutes() + ":" + data.getSeconds(); time1 is our text from before, and we set its text to be first hour then a : then minut then : seconds And we are done. Now as we converted our timer to a movie clip we can easily apply a small animation to it. 5. |




