--- In [email protected], "tonyjobrien" <ya...@...> wrote:
>
> --- In [email protected], "Amy" <amyblankenship@> wrote:
> >
> > --- In [email protected], "tonyjobrien" <yahoo@> wrote:
> > >
> > > I'm trying to get the FadeIn effect to work on my List control, 
but
> > > I'm having no luck. The custom renderer stays white for the
> > > FadeInDuration and then appears instantly. If I switch back to 
using
> > > the default renderer, all is well. Also, if I have both a list 
with 
> > a
> > > custom renderer and the default at the same time, they both 
exhibit
> > > the same behaviour as the custom renderer. Here is a simple 
Flex app
> > > that shows the issue (comment out the lists as required).
> > > 
> > > FYI, I'm using Flex 3 on Windows XP with Firefox 3.
> > 
> > Try changing:
> > 
> > <mx:itemRenderer>
> > <mx:Component>
> > <mx:Canvas>
> > <mx:Label text="{data.label}"/>
> > </mx:Canvas>
> > </mx:Component>
> > </mx:itemRenderer>
> > 
> > 
> > to
> > 
> > <mx:itemRenderer>
> > <mx:Component>
> > <mx:Canvas>
> > <mx:Label text="{data.label}" blendMode="layer"/>
> > </mx:Canvas>
> > </mx:Component>
> > </mx:itemRenderer>
> > 
> > HTH;
> > 
> > Amy
> >
> 
> Amy,
> 
> I have tried that but it still does not display properly. I've tried
> changing the Canvas component to other container objects, but they 
all
> appear to exhibit the same functionality.
> 
> I've tried with both 3.1 and 3.2 versions of the SDK.
> 
> The list effect starts with a background color of blue (to make it
> easier to see what's happening). When using just a Label as the
> renderer, I can see the blue background boxes resizing into position
> and then the label fading into view over the 4 second duration.
> 
> But when using any sort of container object (admittedly I've only
> tried Canvas, HBox and VBox), the list remains white for the entire 
4
> second duration, at which point, the renderers become visible
> immediately (with no blue background or fading at all).
> 
> When I place both list views on the screen at once, they both 
exhibit
> the behaviour of the container renderer. This leads me to believe 
that
> the container is doing something different and the single-threaded
> nature of Flash is causing both views to update once the fade effect
> has finished.
> 
> Problem is, I can't work out what it's doing.

I suspect that the problem is with one of two things:

1)  The specific way that the itemsChangeEffect is implemented
2)  The loop where you add the items to the ArrayCollection.

The reason I say the first is that you can see an example here 
http://flexdiary.blogspot.com/2008/09/groupingcollection-example-
featuring.html where fade effects are working fine on containers.  So 
if there is a problem with fade effects, it's specific to what 
happens in that particular situation.

If it's the second, you can figure it out pretty quickly by calling 
disableAutoUpdate() before the loop where you populate the AC and 
enableAutoUpdate() after the loop.

Finally, you may want to double-check to make sure that you did 
actually set the blendMode on the label to "layer".

HTH;

Amy


Reply via email to