Obligatory Flickr post

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.

Author: Arpit Mathur

Arpit Mathur is a Principal Engineer at Comcast Labs where he is currently working on a variety of topics including Machine Learning, Affective Computing, and Blockchain applications. Arpit has also worked extensively on Android and iOS applications, Virtual Reality apps as well as with web technologies like JavaScript, HTML and Ruby on Rails. He also spent a couple of years in the User Experience team as a Creative Technologist.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: