# Calendar Messages

**URL:** <https://forum.kirupa.com/t/calendar-messages/213804>\
**Category:** flash\
**Created:** [January 23, 2007, 11:42am UTC](https://forum.kirupa.com/t/calendar-messages/213804 "2007-01-23T11:42:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shard](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@Shard](https://forum.kirupa.com/u/Shard)\
**Post date:** [January 23, 2007, 11:42am UTC](https://forum.kirupa.com/t/calendar-messages/213804/1 "2007-01-23T11:42:49Z")

</div>

Greetings to all AS geniuses out there - please help - lol

I have a flash 6 calendar that loads data externally and populates two arrays (one for dates (\_global.caldate) and one for messages (\_global.caldata)). When the user changes the month it shows all of the relevant dates and then uses this function (below) to enable a blank button over the dates that have messages. Upon clicking the button it should display the message in a seperate text field.

//show dates with info  
for(i=0;i\<\_global.caldate.length;i++){  
temp = \_global.caldate\*.toString(); temp2 = parseInt(temp.substr(3,2));//the date is stored as 12:01 and i check that the month matches that displayed  
if(temp2 == today\_date\_month){  
temp3 = parseInt(temp.substr(0,2));  
eval(“this.c” + temp3).gotoAndStop(3);//highlight the date with a red background  
eval(“this.c” + temp3).datbut.enabled = true;//enable that dates seethru button  
eval(“this.c” + temp3).datbut.onRelease = function() { calMess.text = \_global.caldata\*; }  
}  
}  
//end show dates with info

The problem is the last line … calMess.text = \_global.caldata\*; … as this doesnt work.  
Any help greatly appreciated - it obviously is overwriting the onrelease function as it cycyles thru the array and i need a way to assign a working function to that button and then erase it for the next displayed month.
