Found some interesting Code!
Hi Bret,
I found this code! Perhaps you know how to solve the problem!
1. Create a movie clip and inside this clip add a dynamic textfield. Then give this a variable name display (not an instance name) then attach the following code to the clip
Code:
onClipEvent (enterFrame) {
myDate = new Date();
endDate = new Date(2008, 7, 24); // the date to count down to note months are from 0 to 11
milliseconds = endDate-myDate; // milliseconds until the end date
if (milliseconds < 0) { // the date has passed
display = "You missed it";
} else {
days = (((milliseconds/1000)/60)/60)/24;
actualDays = Math.floor(days); // just use the integer part of the days
remain = days-actualDays;
hours = remain*24;
actualHours = Math.floor(hours);
remain = hours-actualHours;
minutes = remain*60;
actualMinutes = Math.floor(minutes);
remain = minutes-actualMinutes;
seconds = remain*60;
actualSeconds = Math.floor(seconds);
actualHours = (actualHours>9) ? actualHours : "0"+actualHours;
actualMinutes = (actualMinutes>9) ? actualMinutes : "0"+actualMinutes;
actualSeconds = (actualSeconds>9) ? actualSeconds : "0"+actualSeconds;
// do something to display the time remaining
display = actualDays+" days, "+actualHours+" hours, "+actualMinutes+" minutes, "+actualSeconds + " seconds";
}
}
My question to this code is: Can we change the Date fields?
Is it possible to create an automatic Day Field but every Day has a certain Start-Time and a certain End-Time! I mean the start Time is always 10:00 and the endTime is always 08:00 (22 houres)
Example:
Quote:
Sunday, 7, November 2007 Start= 10:00 End = 08:00
Monday, 8, November 2007 Start= 10:00 End = 08:00
And then a textfield Countdown
Quote:
6:43:33 to buy this Product
6:43:32 to buy this Product
00:00:00 END
I mean, the banner should automatic change the Date fields, and
Textfields should give the information 6:43:32 to buy this Product....