What a dork
Posts: 16
136 credits Members referred : 0
« on: Sep 14, 2005, 07:57:48 PM »
I have a movie with 31 frames. Each frame has an other clip on it which is playing forever.
I want when the movie loads, automatically go to the frame of the day number.
For example if the date is 31 of September, it will go to the frame 31.
Is that possible?
Vamos lamogianistas
Total Zero
Posts: 5
30 credits Members referred : 0
« Reply #1 on: Sep 15, 2005, 11:17:11 AM »
Assuming the movieclip which contains the 31 frames ic called 'Calendar', just put an empty keyframe in the begining of 'Calendar' movieclip and paste the following code :
Code:
stop(); b = new Date; // set b as new date object a = b.getDate(); // b calls the getDate method which returns the day of the month (an integer from 1 to 31) gotoAndStop(a + 1); // we put an empty keyframe in the begining so we have to add 1
Hope that helps you!
What a dork
Posts: 16
136 credits Members referred : 0
« Reply #2 on: Sep 15, 2005, 12:37:09 PM »
Thanks man.
I couldn't imagine that this is so simple
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=270