[color green]Just to let you know that I'm relocating my server as of today, and for a period of three to four weeks, none of the links to my files on this site will work.
If you need a file from me which is linked from this site then please just email me details of the relevant link and I will send the relevant file(s) to you.
After I've relocated the server and all the files within it I shall endeavour to update all links in Tek-Tips.[/color]
Some of you may have had problems accessing these files, the links are now corrected, apologies. ;-)
Couldn't be easier, Flash does it all for you......
Create dynamic text-fields for each component you want to show (ie: hours, mins, secs, time, date, whatever) and give them each a variable name.
Right click the first frame of the timeline and insert actions thus:
[color red]
[color green]//This line sets up the 'object', necessary to associate the variables.[/color]
davdesigndate = new Date();
[color green]//This line associates the dynamic text-field containing the /:hours variable with the date object and requests the 'hours'. You can work the rest out from this.[/color]
/:hours = davdesigndate.gethours();
/:mins = davdesigndate.getMinutes();
/:secs = davdesigndate.getSeconds();
/:fulldate = new Date( year, month, date, hour, min, sec, ms );
[/color]
Right-click again on the first frame and select 'insert-frame' from the drop down menu, this ensures thst the 'seconds' are updated.
In the Actions pop-up within Flash you can find the Date functions under OBJECTS>DATE>.
To get the dots, just create a movie-clip with aplha tweening, for the flashing to represent one second, just insert frames between the tweens equivalent to the frame rate of the movie. ie: in the example, the distance between tweens is 20 becasue the movie fps is 20
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.