|
timedisplay = new Date(); var hours = timedisplay.getHours()>9 ? timedisplay.getHours() : “0?+timedisplay.getHours(); var minutes = timedisplay.getMinutes()>9 ? timedisplay.getMinutes() : “0?+timedisplay.getMinutes(); var seconds = timedisplay.getSeconds()>9 ? timedisplay.getSeconds() : “0?+timedisplay.getSeconds(); timedisplay = (hours + ” . ” + minutes + ” : ” + seconds); myDate = new Date(); tDay = weekdays[myDate.getDay()]; tMonth = months[myDate.getMonth()]; tDate = myDate.getDate(); tYear = myDate.getFullYear(); theDate = tDay+", "+ tMonth+" "+tDate+", "+tYear;
In this HD High Definition Flash tutorial after drawing a clock, from scratch, Avraham gives life, taking system date and time and through rotation method, makes it live! Grab the source for this SWF here. 9. Flash - Create date on flash stage very quickly using a little AS - Actionscripting - FlashValue.net
timedisplay = new Date(); var hours = timedisplay.getHours()>9 ? timedisplay.getHours() : "0"+timedisplay.getHours(); var minutes = timedisplay.getMinutes()>9 ? timedisplay.getMinutes() : "0"+timedisplay.getMinutes(); var seconds = timedisplay.getSeconds()>9 ? timedisplay.getSeconds() : "0"+timedisplay.getSeconds(); timedisplay = (hours + " . " + minutes + " : " + seconds); STEPS TO FOLLOW: 1. Create a new flash 8 document about 450×50 pixels. Insert one more layer and then rename the bottom layer display and the top one actions.
You can make your Flash site display current time and date with the help of the Date() class available in ActionScript. This class has all the necessary methods to retrieve full information about the current time. Before using these methods you need to create a date "object" in the class, this is because the methods are not static and they can only be applied to a single object. To create a Date object use the following syntax: It is easy to get Flash to display the day and date. Alternatively you can have Flash display only the day or only the date. Flash can also be used to display the time. This tutorial shows you how easy it is to display the day and date. Have a look at the date and day below: Example: Download the Flash file Int 030b |
| w_w__w_.j___a__v_a___2s.__co___m | Contact Us |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |