Groups | Blog | Home
all groups > flash actionscript > july 2006 >

flash actionscript : Countdown date


FlashAmit
7/10/2006 9:50:09 PM
Kyle Type-S
7/10/2006 9:53:55 PM
there are also several tutorials on the web that you could just copy-n-paste
the code from. One in particular i'm thinking of is days/hours/min/sec untill
Christmas counter. Change the math to use variables instead of fixed values,
then give a way to have imput for those variables and you're set.
Mastercafe - Juan
7/10/2006 11:21:03 PM
Hi group, i'm trying to make a simple FLA with put the difference between
actual date() and other future date (like 31/12/2006)
How to put time difference with action script??

Thanks in advance

--
Saludos desde Oviedo (Asturias)

Juan Menéndez
Mastercafe S.L.
www.mastercafe.com
juan@mastercafe.com

Si la información recibido te ha servido indicalo con otro post.
En caso de resolverlo por otros medios, indica la solución usada
ayudaras a otros y aprenderemos todos.


begin 666 Juan Menéndez.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..DUE;NEN9&5Z.TIU86X-"D9.
M.DIU86X@365NZ6YD97H-"DY)0TM.04U%.DUA<W1E<F-A9F4-"D]21SI-05-4
M15)#049%(%-,#0I414P[2$]-13M63TE#13HY.#4Q,34W.# -"E1%3#M#14Q,
M.U9/24-%.C8R-RXU,S$N-S8T#0I!1%([2$]-13H[.U!L87IA(%!U97)T82!D
M92!%=7)O<&$@,BP@,2U$.T]V:65D;SM!<W1U<FEA<SLS,S Q,3M%<W!A\6$-
M"DQ!0D5,.TA/344[14Y#3T1)3D<]455/5$5$+5!224Y404),13I0;&%Z82!0
M=65R=&$@9&4@175R;W!A(#(L(#$M1#TP1#TP04]V:65D;RP@07-T=7)I87,@
M,S,P,3$],$0],$%%<W!A/48Q80T*55),.TA/344Z:'1T<#HO+W=W=RYM87-T
M97)C869E+F-O;0T*55),.U=/4DLZ:'1T<#HO+W=W=RYM87-T97)C869E+F-O
M;0T*14U!24P[4%)%1CM)3E1%4DY%5#IJ=6%N0&UA<W1E<F-A9F4N8V]M#0I2
@158Z,C P-C W,3!4,C$R,3 S6@T*14Y$.E9#05)$#0H`
`
end
urami_
7/11/2006 12:00:00 AM


[quoted text, click to view]

drop it on frame, make text field with variable name "timeRemaining"
Put it in some loop like setInterval or enterframe or two frames movie clip to update the timer.
Take note that dates are months are counter from zero to 11 not 1 to 12 so if you want
December, you need to use 11.


now = new Date();
euro = new Date(2006, 11, 30, 23, 59, 59);
days = (euro-now)/1000/60/60/24;
daysRound = Math.floor(days);
hours = (euro-now)/1000/60/60-(24*daysRound);
hoursRound = Math.floor(hours);
minutes = (euro-now)/1000/60-(24*60*daysRound)-(60*hoursRound);
minutesRound = Math.floor(minutes);
seconds = (euro-now)/1000-(24*60*60*daysRound)-(60*60*hoursRound)-(60*minutesRound);
secondsRound = Math.round(seconds);
if (secondsRound == 1) {
sec = " second ";
} else {
sec = " seconds ";
}
if (minutesRound == 1) {
min = " minute ";
} else {
min = " minutes ";
}
if (hoursRound == 1) {
hr = " hour ";
} else {
hr = " hours ";
}
if (daysRound == 1) {
dy = " day ";
} else {
dy = " days ";
}
timeRemaining = daysRound+dy+hoursRound+hr+minutesRound+min+secondsRound+sec;

--
Regards

Urami


--



Happy New Year guys - all the best there is in the 2006 :)




<urami>
http://www.Flashfugitive.com
</urami>

<web junk free>
http://www.firefox.com
Mastercafe - Juan
7/11/2006 1:55:20 PM
Thank you very much i try to use this today, it looks perfect for me :-)

--
Saludos desde Oviedo (Asturias)

Juan Menéndez
Mastercafe S.L.
www.mastercafe.com
juan@mastercafe.com

Si la información recibido te ha servido indicalo con otro post.
En caso de resolverlo por otros medios, indica la solución usada
ayudaras a otros y aprenderemos todos.

"urami_" <runnerHaHaHIHI@HAHAHIHIflashFugitive.com> escribió en el mensaje
news:e8vtlk$40h$1@forums.macromedia.com...
[quoted text, click to view]

Mastercafe - Juan
7/11/2006 1:56:27 PM
Which URL you refer??
Thanks

--
Saludos desde Oviedo (Asturias)

Juan Menéndez
Mastercafe S.L.
www.mastercafe.com
juan@mastercafe.com

Si la información recibido te ha servido indicalo con otro post.
En caso de resolverlo por otros medios, indica la solución usada
ayudaras a otros y aprenderemos todos.

"Kyle Type-S" <webforumsuser@macromedia.com> escribió en el mensaje
news:e8ui9j$cm8$1@forums.macromedia.com...
[quoted text, click to view]

AddThis Social Bookmark Button