Link to home
Start Free TrialLog in
Avatar of christamcc
christamccFlag for United States of America

asked on

Changing date colors on Flash calendar - new format not staying

I'm using the DateChooser Calendar in flash.  When  previous or next month arrow is clicked this happens:

calendar_mc.calendar_dc.addEventListener('scroll', updateMonth);

/************  Change the Date selected on the Calendar ****************/    

function updateMonth(eventObj:Object)
{
     //I don't think you need to see the code. Basically runs and highlights the dates in the calendar for that month that have something going on on that date (info from array)
};

PROBLEM:  The dates highlight - whopee! but then alas when it gets to the close of the funtion they dehighlight. (and I've debugged this, it clears the highlights basically at "};")  Anybody know how to fix this?

I thought maybe it had something to do with the highlights were being made before the calendar fully loaded, but not sure of a solution.

Kind of urgent timewise so I'm giving 500points.
Thank you!
Christa
Avatar of Ramy_atef
Ramy_atef

Hi
Better to send the FLA , as the date chosser doens't dehighlight the date onMouse out !!

Regards,
Avatar of christamcc

ASKER

Here's the funtion:

var myListner = new Object();
myListner.scroll = function(eventObj:Object) {
     trace("scroll function working");
       calendar.dateGrid["dayBlock3label3"].setStyle("textColor", "0xFF0000");

};
calendar.addEventListener('scroll', myListner);
Hi
Why won't you use the simple way of date highlighting

something like that

calendar.selectedDate = new Date(2006, 6, 7);

without the need of listener or so , and this method will highlight the date and it'll still gihlighted even if u scroll through months and came back to it..

Thr problem with your code is that it changes the color of the date JUST before it goes to another month which redraw all the numbers again with the original color ...

Regards,
Ramy
Thanks for your suggestion Ramy!
Will this mean when someone selects a date it will look the same as the dates with content therefore not making it clear which date is selected?

"Thr problem with your code is that it changes the color of the date JUST before it goes to another month which redraw all the numbers again with the original color ..."

Is there a solutions to the load issue?
ASKER CERTIFIED SOLUTION
Avatar of Ramy_atef
Ramy_atef

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hmm, ya interesting work around. ok, I'll try a version of that too. thank you!

I put it live as is, which is unfavorable but will continue to trouble shoot it.  I'll be back to award points.  I don't want to close it yet because I want to see if anyone has other ideas that are directly related to the Event Handler.