actionscript

HTML Eats Babies and Spits Hot Fire

HTML5 is fast becoming the new hot thang that all the guys want to fuck.  But, like the hot girl:  she’s a raging bitch, requires a ton of maintenance, actually is just so-so  in bed, and you cannot protect your investment (because she’s open, but remember she has standards). And all the boys want to have their way with her:  Google is the new kid on the block, Microsoft the rich kid that wants to buy her, her best friend Mozilla has been holding her hands when time was tough, and now Apple the bad boy because he wants to prove to his gay lover that it’s really over.

› Continue reading

Tags: , , , ,

Saturday, June 5th, 2010 expo, interests No Comments

Show Me More: Paging Array Collections

I have been working for a while recently on grooveshark’s newest feature: activity I needed to come up with a way for our array collections to only render or show a small set of what feeds actually have in them. [People stop listening to so much damn music.]

What is great about array collections is they handle all sorts of stuff for you, such as binding and updates. But what’s really great is the ability to differentiate a view from the underlying data, which allows you the use of filters for features like active searching on a collection.

So what I needed was a way to click show more and it would reveal the next set.

And extend and implement

private var _pagesVisible:uint = 1;

[ChangeEvent("collectionChange")]
public function get pagesVisible():uint
{
     return _pagesVisible;
}

public function set pagesVisible(value:uint):void
{
     // allow it to be ready for soon to be populated data
     if (value <= (pages+1)) {
           _pagesVisible = value;
           this.refresh();
     }
}

private function feedFilter(item:Object):Boolean
{
     var isIncluded:Boolean
          = (source.indexOf(item) < PAGE_SIZE * pagesVisible);
     hasMorePages = !isIncluded;
     return (isIncluded);
}

Tags:

Wednesday, June 2nd, 2010 projects No Comments