Its a list of, let’s say 50 items. These items provide content for dynamically generated movieclips on a timeline-like interface.
Some items share a same date (e.g. august 2002). when there’s two things in a same month, I need to generate two movieclips that pop out of my timeline…
I need something that tells me:
august 2002 --> 2 items
september 2002 --> 1 item
november 2002 -->3 items
december 2002 --> 1 item
how should I do this / what technique should I use ?
Instead of
&title1=blablabtitle&content1=blabcontent&date1=august 2002
I’d use
&item1=titleHere|contentHere|dateHere
then use a count variable to track the number of items (variables) read in,
then loop through and use a “split(”|") on each,
gives you an array with
item1[0] = title, item1[1]=content and item1[2]=date;
now set up a var for each month (1 to 12 or better 0 to 11);
loop through items :
for (i=1; i<count (number of items, remember…); i++)
check if(item add i[2] (2’s the index for the date)== “january2002”)
then add 1 to the 1st var of the months,
else if(… == “february2002”)
increment 2nd month var (counter)
etc etc etc for all 12, so you’ll get a value for each…
Get the idea? Hope this pseudo-code is clear enuff, just thought that up quickly, might be a simpler way, I’m no guru