Sorting Images with a Flex Tile Component
This is a test for an image manager component that I’m building. The final version will have an upload feature, and when you sort the images they’ll hook up with their model in Rails using acts_as_list to save the sorting in the database. Right click the swf below to view source.
I’ve built something similar in Flash/AS2, and without sounding too much like a Adobe marketing rep, I have to say it’s so much easier in Flex/AS3. AS2 doesn’t have ArrayCollections so moving things around in an array was a bit of a headache, but in AS3 you can just remove an item from a list ( myCollection.removeItemAt(x) ) and then place it back anywhere ( myCollection.addItemAt( item, x ) ) and all the other items will shift down the list.
Another big time saver is the DragManager in AS2 you had to manually handle all kinds of dragging functions but with AS3 you just add a couple of events and you’re done. Even the Tile component saves having to layout the images by hand.
Anyways long story short the AS2 version took a couple of days to build and the Flex version took a couple of hours.




Like this post? subscribe to the feed.






