nite21
06-22-2008, 12:20 PM
hi i have a movieclip mc inside it there are two frames
frame1 contains mydata dynamic textfield and frame2 contains one loader movieclip to load image and two dynamic textfield TextHolder1 and TextHolder2
im displaying data and image based on times
suppose it is june 22
im showing mc frame1 on 11 am till 3:59 pm
and from 4 pm till next day june 23 10:59 am im showing mc frame 2
it works fine im using date1 variable as current date to display the text
here is the code
if(hours >= 16 && hours < 24)
{
mc.gotoAndStop(2);
mc.TextHolder1.text = nite2[date1];
mc.TextHolder2.text = nite3[date1];
if(a == 1)
{
loadMov(date1);
a=0;
}
}
if(hours >= 0 && hours < 11)
{
mc.gotoAndStop(2);
n=nite2[date1-1];
s=nite3[date1-1];
mc.TextHolder1.text = n;
mc.TextHolder2.text = s;
//mc.TextHolder1.text = nite2[date1];
//mc.TextHolder2.text = nite3[date1];
if(a == 1)
{
loadMov(date1-1);
a=0;
}
}
but what happens when im on 30th june and when i move to july 1
it shows me undefined for the condition hours >= 0 && hours < 11
since date1 is 1 (1st july) and date1-1 gives me 0 and so i get undefined
will someone help me in this
on 30th june 11:59 pm it shows me Test 30 but when it moves to 1st july it shows me undefined
i wanted it to Test 30 only in dyanamic textfield
i wanted to show when it moves from 30th june to 1st july the same text
mc frame 2
frame1 contains mydata dynamic textfield and frame2 contains one loader movieclip to load image and two dynamic textfield TextHolder1 and TextHolder2
im displaying data and image based on times
suppose it is june 22
im showing mc frame1 on 11 am till 3:59 pm
and from 4 pm till next day june 23 10:59 am im showing mc frame 2
it works fine im using date1 variable as current date to display the text
here is the code
if(hours >= 16 && hours < 24)
{
mc.gotoAndStop(2);
mc.TextHolder1.text = nite2[date1];
mc.TextHolder2.text = nite3[date1];
if(a == 1)
{
loadMov(date1);
a=0;
}
}
if(hours >= 0 && hours < 11)
{
mc.gotoAndStop(2);
n=nite2[date1-1];
s=nite3[date1-1];
mc.TextHolder1.text = n;
mc.TextHolder2.text = s;
//mc.TextHolder1.text = nite2[date1];
//mc.TextHolder2.text = nite3[date1];
if(a == 1)
{
loadMov(date1-1);
a=0;
}
}
but what happens when im on 30th june and when i move to july 1
it shows me undefined for the condition hours >= 0 && hours < 11
since date1 is 1 (1st july) and date1-1 gives me 0 and so i get undefined
will someone help me in this
on 30th june 11:59 pm it shows me Test 30 but when it moves to 1st july it shows me undefined
i wanted it to Test 30 only in dyanamic textfield
i wanted to show when it moves from 30th june to 1st july the same text
mc frame 2