?
Solved

Changing date colors on Flash calendar - new format not staying

Posted on 2006-06-07
6
Medium Priority
?
215 Views
Last Modified: 2010-08-05
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
0
Comment
Question by:christamcc
  • 3
  • 3
6 Comments
 
LVL 7

Expert Comment

by:Ramy_atef
ID: 16855874
Hi
Better to send the FLA , as the date chosser doens't dehighlight the date onMouse out !!

Regards,
0
 

Author Comment

by:christamcc
ID: 16858128
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);
0
 
LVL 7

Expert Comment

by:Ramy_atef
ID: 16859694
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
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:christamcc
ID: 16874034
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?
0
 
LVL 7

Accepted Solution

by:
Ramy_atef earned 1500 total points
ID: 16874623
mmm ok here is another way around

function test() {
      if (_root.calendar._width>1) {
            _root.calendar.dateGrid["dayBlock3label3"].setStyle("textColor", "0xFF0000");
            clearInterval(myInterval);
      }
}
myInterval = setInterval(test, 200);


Regards,
Ramy
0
 

Author Comment

by:christamcc
ID: 16907599
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.  

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question