They both work if the other one is not there… is there a way to mix them together? i tried to remove the var date = from the lower script and then add the VAR’s to the function, but its like it dosent read them at all… is there any way?
im guessing the scripts are scre*ing because of the 2 new Date();
Please help.
thanks
function updateTime() {
myTime = new Date();
seconds = myTime.getSeconds().toString();
while (seconds.length<2) {
seconds = "0"+seconds;
}
minutes = myTime.getMinutes().toString();
while (minutes.length<2) {
minutes = "0"+minutes;
}
hours = myTime.getHours().toString();
delete myTime;
for (clock; (hours>=13); hours-=12) {
}
for (clock; (hours==0); hours=12) {
}
}
fscommand("allowscale", false);
stop();
var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
var date = new Date();
var month = months[myTime.getMonth()];
var dayname = days[myTime.getDay()];
var daynum = myTime.getDate();
var year = myTime.getFullYear();
var thedate = "FECHA ("+dayname+" "+daynum+" "+month+", "+year+".";
*i got the codes from kirupa and lastboy… forgot the name
Now on the stage create a textbox on the stage with the var name “fullDate” and another textbox with the var name “fullTime” (both with no quotes).
I have been meaning to update my tutorial with this, but I lost the file, just found it today…LOL. So I updated the code to support the date and time (non military of course) and I removed a bit of useless code and fixed some bugs in the script ::sigh… thinks back on the good old days::
PS: Please allow some time for answering, we can’t get to every post on this board in 30 minutes or less…lol, we aren’t a pizza delivery service
I believe in Open Source, so any code I make I will allow others to have (unless it is for a job or something and I am not allowed to). Especially with scripts like this, where there are hundreds of them on the web that are just like or better