Wow, Amy. This is the first time I have seen you top post. Have you been 
assimilated? (Resistance was futile)

--- In [email protected], "Amy" <amyblankens...@...> wrote:
>
> Check out TileList_withStyle. 
> http://flexdiary.blogspot.com/2008/08/tilelist-with-stylefunction.html.
> 
> I think this will do what you want--you'll just need to shift your approach a 
> bit and move the things that you would normally set in the factory into being 
> styles.
> 
> HTH;
> 
> Amy
> 
> --- In [email protected], "flexwdw" <flexwdw@> wrote:
> >
> > A pattern I am particularly fond of when dealing with TileList(s) that use 
> > complex item renderers is to split my parameters up.  I only pass items in 
> > via the "data" property which are different on a per tile basis.  For items 
> > that need to be passed into the renderer that are the same for each tile, I 
> > pass them in via a ClassFactory instance that is newed up to 
> > MyItemRenderer.  I then set myClassFactory.properties to contain the 
> > properties I wish to set (which are exposed as public properties on the 
> > item renderer class).  Finally, I set the TileList's .itemRenderer property 
> > to myClassFactory.
> > 
> > Typically, I only ever have to set the TileList's itemRenderer property 
> > once.  However, I recently ran into a situation where I have a piece of 
> > "factory" data that changes, but needs to change for all items in the 
> > TileList.  Therefore, resetting the TileList's itemRenderer by creating a 
> > new ClassFactory instance seems to be the most logical way to achieve this. 
> >  Problem is, this causes a "term is undefined and has no properties" error 
> > in TileBase.createItemRenderer [line 1956].  
> > 
> > Is there anything wrong with this approach?  Do I need to null out a data 
> > provider or something to make this work?  I know of many other solutions to 
> > this problem than this, but this pattern is so handy and clean for my 
> > situation that it would be a bummer if this didn't work – I'd like to 
> > understand why.
> > 
> > Thanks for the help!
> > 
> > [note, I am currently targeting Flash 10.0 and using the 3.2 SDK]
> >
>


Reply via email to