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....
Embeded swf does not show the servertime!
Hi Wilbert,
your code is working fine! Everthing is finished and now this:
Quote:
1. The servertime is one hour back!
I mean in germany it is 17:00
but the servertime is 16:00
and embeding is not correct!
Quote:
When I embed the swf.file the servertime is not visible!
Although the servertime.php is in the same folder!
I got a problem, when I embed this swf file!
If I start the flash file directly, like
http:\\www........time.swf
it works fine with all the servertime!
If I embed this time.swf file in my Shop, it does not show the servertime, although I copied the servertime.php in the same folder where the swf file is!
Then I tried to embed the original Path:
I mean that path which is working...
Code:
<embed width="687" height="100" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www...../test/time.swf"></embed>
Im my folder test is the servertime.php and the time.swf
But it does not shows the servertime if I embed this file!
The website which embeded the time.swf file is a php site:
Code:
domain/index.php?cat=c14_city.html
I copied the servertime.php in the main folder without success!
Do you know the problem?