May 2008 Archives

freddy.jpg

We here at squidder have a love/hate relationship with scrollbars. Partly because, while seemingly simple, they can overly complicated very quickly. 

So when we wrote our latest scrollbar class, we decided to try out scrollRect. Seemed pretty strait-forward -- just pass in a rectangle and it takes care of all the masking, offset and everything. Way more efficient than setting a mask and then moving that about... or so we thought. (cue dramatic crescendo)
A lot of people really haven't figured out the best use for AIR apps yet, and we at squidder are no different. Most of time, an online app will let you get away with most everything that you want to do. Personally, I think the infatuation with AIR comes from a desire for flash developers to feel more like 'real' developers (zing!).

No, seriously. One of the best ways to see what to do (and what not to do) is to just take a look at what other people are doing. And there may be no better place to do that than at freshairapps.com. Regular expression checker anyone?

And yes, I feel bad for writing that headline.

SWFAddress plus mod_rewrite = SEO bliss

seo.jpg

We at squidder often talk about the best way to bring SEO and accessibility to our flash work. And in many ways, the work is simple when you add in fancy tools like SWFObject -- just spit out the content you want to appear to a search engine in the div that gets overwritten!

But what if you've got an extremely complex site, with many sections, pages and drill downs that you want to make accessible? One option is to simply spit out all the content, no matter how long, into that same div. Yes, that will get indexed by search engines, but not only does it make the page you're loading very large, it also doesn't link users directly to the content they searched for.

That's where SWFAddress and mod_rewrite come in. Full deets after the jump.

Dictionary + Timer = Delicious

I encountered a problem yesterday in attempting to instantiate many (5-30 ish) timer objects while needing to provide each with a unique parameter.  The ez solution?  Create a dictionary object with whatever arguments you need to pass to your timer.  Then add your timer to the dictionary.  Once your timer is up, simply look up the dictionary definition for your timer event's target.  Here we go:

private var dictionary : Dictionary = new Dictionary();


private function yourFunction(x:Number : void {

var timer:Timer = new Timer(500,1);

dictionary[timer] = x;

timer.start();

timer.addEventListener(TimerEvent.TIMER, callBack);

}


private function callBack(e:Event) : void {

trace("!! my parameter = "dictionary[e.target]);

}


AS3 and Flash you'll lose your ink over.