Had a few hours (well actually I didnt but I couldn’t but I needed a break from ‘work’ 😉 ), so I decided to refactor some of the code from Flexamp and create a few ‘widgets’ (I am beginning to hate that term by the way). Anyway, I had the basic application out in like 20 minutes but I wanted to see if I could do something a little more fun. So I tried to create a tsunami kind of Flickr photoshow when the images expaned when you rolled over them. So the logic was simple:
- Load the Flickr Images
- Populate a Tilelist with the data with a custom itemRenderer
- In the itemRenderer, on rollover set the Image component’s source to the large image url
- invalidate the tilelist so that the new image can be drawn larger than irs neighbours
Unfortunately that didnt work and here is why that seems to be:
According to the Flex docs for TileList:
You can set the size of the tiles by using the rowHeight or columnWidth properties. Alternatively, Flex measures the item renderer for the first item in the dataProvider and uses that size for all tiles.
So looks like you cant have a custom tile with different dimensions than the rest of the tiles.
So after two hours I was back where I started from. I’ll try to play around more with it and see if I can do something about it.
The only thing i did learn was that to get to the _root of the application you need to reference it as Application.application
[SWF] /blog/swf/flickr.swf, 450, 475 [/SWF]
PS: The Search Button seems to require clicking twice. Not sure why.