{lang: 'de'}
Flashhilfe.de - Flash Community

Countdown hilfe - ZEITFORMAT [Flash 10]

 


AntwortenRegistrieren Seite1  

dasss#1
Benutzerbild von dasss
Beiträge: 2
Registriert: Jun 2010

03.06.2010, 21:25

Also ich habe ein tolles Script mit funktionierenden Countdown, nun hätte ich aber gerne das Zeitformat in 00:00:00:00 gehabt. Was muss ich wo wie ändern?? Bin für jede Hilfe dankbar!

ActionScript:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//Create a date object for PPV
var PPV:Date = new Date(2010, 06, 12, 2, 00, 0, 0);
            
//Current date object
var now:Date = new Date();
// Conditional to snap to frame 3 if it is PPV or past PPV
if (now >= PPV) {
   gotoAndStop(3);
}
// Set the difference between the two date and times in milliseconds
var timeDiff:Number = PPV.getTime() - now.getTime();
//Convert the timeDiff(which is in milliseconds) into regular seconds-minutes-hours-days   
//The Math.floor is the closest rounded integer that is less than or equal to the decimal number
var seconds:Number = Math.floor(timeDiff / 1000);
var minutes:Number = Math.floor(seconds / 60);
var hours:Number = Math.floor(minutes / 60);
var days:Number = Math.floor(hours / 24);   
// Set the remainder of the division vars above
hours %= 24;
minutes %= 60;
seconds %= 60;
// String all vars together for display
var timeRemaining:String = "" + days + "  :  " + hours + "  :  " + minutes + "  :  " + seconds;
// Display everything in their dynamic text fileds
timeString.text = timeRemaining;
Schlagwörter: Countdown, Flash, Zeitformat
jomac#2
Benutzerbild von jomac
Beiträge: 89
Wohnort: CH
Registriert: Jun 2010

03.06.2010, 21:45

ActionScript:
1var timeRemaining:String = "" + (days < 10 ? "0" + days : days) + "  :  " + (hours < 10 ? "0" + hours : hours) + "  :  " + (minutes < 10 ? "0" + minutes : minutes) + "  :  " + (seconds < 10 ? "0" + seconds : seconds);
dasss#3
Benutzerbild von dasss
Beiträge: 2
Registriert: Jun 2010

Themenautor/in

04.06.2010, 00:57

Vielen Dank ;)

AntwortenRegistrieren Seite1  

Schnellantwort

Du musst registriert sein, um diese Funktion nutzen zu können.

 
Ähnliche Beiträge zum Thema
Partner Webseiten: art-and-law.de  Mediengestalter.info   phpwelt.de   Scubacube.de  
Haftungsausschluss   Datenschutzerklärung   Impressum
© 1999-2024 Sebastian Wichmann - Flashhilfe.de