|
-
Owner of the ™ thread
OK ...
here's the prob .
I have got a array named months for eg.
where i am collecting some Movie Clips Instance names which I will make invisble . by creaing a simple function .
Code:
monthname = new Array();
mydate = new Date();
monthname[0] = january;
monthname[1] = february;
monthname[2] = march;
monthname[3] = april;
monthname[4] = may;
monthname[5] = june;
monthname[6] = july;
monthname[7] = august;
monthname[8] = september;
monthname[9] = october;
monthname[10] = november;
monthname[11] = december;
function clscr () {
x = 0;
while (x<=11) {
monthname[x]._visible = false;
x++;
}
}
clscr();
Now I want to use the mydate.getmonth to get the current month . Do i store that in another variable ?
If so , now I wan't to make it so , whatever month it gets ... say for eg. it is August .... then How do I make that month MC visible ?
If I put it in another While Loop , then it gets thecurrent month OK ... but then due to the Increment i.e x++
it forwards to the last month i.e Array Element 11 and goes to the last month 
Hope you understood what i want !!
If I can use a break statement somehow ... I can't seem to . when it reaches the current month ... then it will go out of the loop , my problem would be solved i guess .
-
try this:
Code:
i=mydate.getmonth
monthname[i]._visible = true;
hope that helps.
-matt
-
Owner of the ™ thread
Originally posted by matticiousg
try this:
Code:
i=mydate.getmonth
monthname[i]._visible = true;
hope that helps.
-matt
bump ... any more suggestions ? ??
-
Woops, I guess I shouldn't have used "i" for my variable. It reads like an italics tag. The code should be like this:
Code:
j = mydate.getMonth ();
monthname[j]._visible = true;
that should work.
-matt
-
Owner of the ™ thread
that was just great ... thank you very very much
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|