Here’s a cool one: Matthew Tretter over at ex animo has come up with a particularly clever way of using JSFL to avoid redundant actionscript bytes when building complex applications by excluding actionscript classes (which you could easily do in AS2, but not so easily in AS3). Well played, jasofel, well played.

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)
Read the rest of this entry »

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.
Read the rest of this entry »
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]);
}
We at squidder have a total actionscript crush on Jack over at GreenSock. He continues his run of amazing classes his TransformMatrixProxy class, which performs some kind of strange voodoo magic using the transform.matrix property to let you tween skewX, skewY and more.
To get access to this awesome class, you’ll need to join
Club GreenSock. 50 scoots gets you these goods and more.
We’re late to the game as usual on this one, but if you’ve ever had a client who wanted MAXIMUM standards complacency and compatibility, its time you checked out Faust flash augmenting standard, evangelized by the future-loving folks over at space150.
Basically, its a really clever way of passing the content that you’re overwriting when you use SWFObject directly into the flash. Super clean and requires only one data call. Handy for things like navigation bars, which while fancy in flash, can also easily be viewed (and indexed) without flash. Hats off, space150, hats off.
Bulk loader is an excellent open source package for managing multiple file loads in AS3. Supporting a wide variety of file types (xml, swfs, images, sounds and more) as well as multiple progress indications (files loaded / total files, weighted percentage and beyond), it’s hard to imagine writing a big, asset heavy project without it.
Lee Brimelow, of TheFlashBlog fame, has posted up a neat AIR app that lets you easily download videos from YouTube in their original flv format. Good example of something that really works well for AIR – more often than not, people make AIR apps out of things that should really just be on the web (you need to make that countdown timer into an application? really?). Next steps: convert to quicktime and add to iTunes.
Sometimes all you want to do is wait a few seconds to make a call to a given function, particularly when you’re doing some sequenced animation. While this is certainly easier now that we’ve got the Timer instead of setInterval (*shudder*), it’s still not a one-liner, especially once you take garbage collection into account.
That’s where Delayer comes in.
- import com.squidder.delayer.Delayer;
- new Delayer( _testfunction , 3000 , “hello there” , 33 );
- function _testfunction( s:String , n:Number ) : void {
- trace( s + ” , ” + n );
- }
Simple enough! The only required variables are the function and the delay (in milliseconds). From there, you can pass through as many arguments you like, if any. There’s also a cancel function, in case you’re into that kind of thing.
TweenMax is the band new tween class, from the outrageously brilliant mind of Jack Doyle. It is the wonderful love child of TweenLite and TweenFilterLite and has some really excellent features, not least of which is the inclusion of bezier points, so we can finally and easily do some tweens on a curve.
Amazingly, Jack managed to pack all of this functionality in 8k (vs 3k for TweenLite), so serious hats off to him – I can certainly say we’ll be using this from now on. Be sure to check out his comparison chart for full deets.