Hi guys,
I googled for 4 hours and read most of the posts that came up when searched for different tags I thought would match, and still have no answer. My problem is the following:
I have a dynamic text field that loads some text and a variable that counts down days, months (for an event lets suppose). It worked perfectly the first time I tested it, then cleaned up the code and that’s when the problems started. You can see it here.
A crippled, ugly version with a different code (that does not work for the countdown) is still standing here. I’ve reached a point where I just give up. HELP!!!
oh!!! btw, here’s the code:
var text1 = "
just a bunch of text
and so on
";
var text2 = "
for after varying one
";
var fecha_actual = new Date();
var monthfield = 12-fecha_actual.getMonth();
var dayfield = 34-fecha_actual.getDate();
var hourfield = 23-fecha_actual.getHours();
var minutefield = 60-fecha_actual.getMinutes();
var secondfield = 60-fecha_actual.getSeconds();
var difference:String = "
"+monthfield+" meses, "+dayfield+" dias, "+hourfield+" horas, "+minutefield+" minutos, "+secondfield+" segundos.
";
main_text.text = text1.concat(difference,text2);
where fecha_actual is the current time and difference is the string holding the varying text.
Any idea on how to solve this?? PLEASE!!!
THANK YOU BEFOREHAND!!!