I was looking into how one might implement zooming in on an item in a Tilelist or zooming out to view more of the items in a Tilelist and stumbled upon a “poor man’s solution”. Implementing true zooming with gradual easing in/out would be much more involved and take you into the depths of Listbase (and probably into private methods, etc).
This is based on code from one of my previous blog posts:
TileList with popup that deletes from dataProvider
Here is the sample and code that demonstrates the approach one might take:
This movie requires Flash Player 9
Download a zipfile containing the source to this sample.
Browse the source of this example.
Or continue into the blog entry to see the source:
Read the rest of this post»
4 Comments »
I had a customer ask how they could use a button itemRenderer in a tile list, have the buttons toggle, and keep track of all the toggled buttons so one could easily clear all the toggled buttons. Here is what I came up with:
The key to this is that if your TileList has a dataprovider that is an array collection, within an itemRenderer, each item’s BaseListData will have a UUID.
If you extend the Tilelist and add a public member that is an arrayCollection that is used to contain all the UUIDs of toggled buttons, then management of those toggled buttons become quite easy.
Here is my simple extension to TileList:
< ?
xml version=
"1.0" encoding=
"utf-8"?>
<mx:tilelist xmlns:mx=
"http://www.adobe.com/2006/mxml"
initialize=
"acToggledButtons = new ArrayCollection()">
<mx:script>
< ![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
public var acToggledButtons:ArrayCollection;
public function removeAll():void{
acToggledButtons.removeAll();
this.invalidateList();
}
]]>
</mx:script>
</mx:tilelist>
Read the rest of this post»
2 Comments »
Recent Comments