Carousel: Getting to CarouselItem(s)
- Same component, different topic.
The carousel in my project lets the user to initiate a load sequence (i.e. a .swf) into a UILoader instance. My project is essentially a shell to browse through and view a variety of training material.
When the user has finished viewing a particular item, I want to set the value of a variable in the corresponding CarouselItem which will set the visibility of a MovieClip (a checkmark) to true. I added this value "completed" using the commitFunction from the CellRendererSymbol class.
Question is: How do you get/retrieve/reference the CarouselItem objects that are created by the carousel's layoutRenderer? The carousel has an array (activeCellRenderers) but it's protected.
I'm saving the completion data in a SharedObject so the next time the interface is loaded, I can re-enable the checkmark in the CarouselItem objects that were previously completed.
- I'm glad to say I can answer my own question.
To update the contents of a CarouselItem - for example the selectedItem within my carousel instance - I simply had to update the properties of the selectedItem and perform a validateNow() on the carousel.
Presto... updated CarouselItem. (I was making the afore mentioned checkmark visible.)
Thanks goes out to Josh for making me actually think about it for a while.