Jon: April 2008 Archives

contact.jpg

The new Alternativa3D platform needs to be seen to be believed.

This kind of stuff makes me love flash and at the same time never use it again. Excuse me while I go weep quietly to myself. 

Stop. You had me at TransformMatrixProxy.

tom.jpg

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.

Faust: Use flash, skip deal with devil.

faust.jpg

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.
becool.jpg

A universal truth of flash is that stuff just needs to be on pixel to look good. Sometimes that's a total pain in the butt. You may get handed a flash file by someone who doesn't realize the importance of the rounded number, or you may just forget until its too late.

That's where you can play it like the Fonz and use our SnapToPixel flash extension. Written in JSFL (or jasofell, if you prefer), the command lives in "Commands -> SnapToPixel" and quite simply runs through all the keyframes on each layer and makes sure each object, text or movieclip is on pixel.

Keep in mind that this will not work on strait-up shapes because of the way jasofell treats them. There also may be a little hankiness if your object is rotated at all (at which point, snapping to pixel won't matter anyway).

Originally written a year ago, we've updated to work correctly with CS3. You can check it out at our google code page. And, if you're so curious, you can see the outrageously simple source code in our squidder svn.

The coolest thing you'll see today


We at squidder love all manner of technology, not just flash. Like wii remotes. And Johnny Lee. And you should too. If you haven't seen this stuff, be sure to check out the video above. 

It'll be the coolest thing you'll see today. More Johnny Lee's wizardry can be seen at his site.
sound_event.jpg

If there's one thing that could be a ton cooler in AS3, its the audio capabilities. Yeah, we've all had fun making spectrum analyzers, but that was back in the hazy, drug riddled days of 2007. This is 2008 and 2008 demands better audio stability and features.

That's where the "Adobe, MAKE SOME NOISE" (sic) campaign comes in. Besides yelling at us, the project aims to end the spotty performance of the existing Sound packages, as well as push for some new, and nifty sounding (HA!), features for the next round of flash.

cokezerogame.jpg

While I don't like to post stuff that you can readily find at the FWA site (squidder awards?), I just caught myself playing with this new Coke Zero game for over 10 minutes. Which is an eternity, really. Of course, you're talking to the guy that seriously can't wait until Line Rider is a DS game.

Overall, the experience does a magnificent job with video and emulating very well that Tarantino, Bobby Rodriguez style (my personal hero. Who else can direct Dusk 'till Dawn AND Spy Kids?). Hats off, too, for reasonable loading times.

Handiest. MovieClip. Ever.

fps_bar.gif

One of the best things that has come out of my time with papervision has almost nothing to do with papervision itself. Indeed, it is the little frame rate bar that sits in the upper left hand corner of some of the example files. I use it for EVERYTHING. Just slap it on the root of the timeline and you've got a live frame rate reading, easy as pie cake (which is more delicious). I have no idea who wrote it originally, but if it was you, seriously, thank you. Geggy Tah style.

You can pull it down along side the papervision examples. I've also packaged it up separately and added it to our google code page. Long term, we at squidder would like to expand on this and include memory usage as well.

Yeah, that's right, I referenced that Geggy Tah song. Bet you hadn't thought of that song in like, what, 10 years?

Bulk loader makes other loaders cry

url_cry.jpg

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.

Generating website thumbnails from flash

Crazy sounding, I know (I know!). And a few months ago, I would have told you that it was in fact crazy. But that was before I found baluga.net's webthumb.

Almost offensively easy to use, Webthumb's API works off a simple xml query that you can make from almost anywhere. It's very easy to set up a lot of the finer details as well, including how the thumbnail is cropped, delay before taking the thumbnail and of course the size -- indeed, you could just have a full view the site as opposed to a thumbnail.

The service is free to try out, with a 100 free credits a month (one request counts as one or more credits depending), though additional ones are quite reasonably priced. And while I probably wouldn't recommend generating a thumbnail each time from the flash, there's certainly no reason you couldn't set up a cron job using flash or VRML or whatever the kids are into these days.
seo_rap.jpg

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.

By the way, if you haven't seen the SEO rap, you owe (OWE) it to yourself to check out all of m0serious' work. Make it happen.

Delayer, uh, delays call to a function

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. 

  1. import com.squidder.delayer.Delayer;
  2. new Delayer( _testfunction , 3000 , "hello there" , 33 );
  3. function _testfunction( s:String , n:Number ) : void {
  4.       trace( s + " , " + n );
  5. }

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.

Go grab it up over at our fancy Google Code project page.

And speaking of TweenMax...

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.
tweenlite.jpg

Now more than ever, flash developers are dependent on outside source code for tweening. In as2, you could get away with using the built in tween class, but the as3 version has proved itself virtually unusable, especially in light of some of the alternatives.

There are a slew of good options out there: Tweener, TweenLite, TweenMax, Go, and more, all with similar feature sets. So which one's the best? 

We here at squidder have this debate often, with some devs who prefer Tweener and others who rely on TweenLite. Fortunately, there are others who have done the heavy lifting for us to give a numbers to numbers face-off.

My favorite point of comparison is the speed tester over at GreenSock. Although it was created by the author of TweenLite (so you could cry foul, I suppose, though it doesn't seem like there's any reason to), it seems to be the easiest way to quickly compare tweens in a real world situation.

For those of you interested in running your own test, you can roll over to the TweenBencher. Again, this is a tool created by one of the makers of a tween class (Go), but read that as you will. Regardless, the tool certainly puts out some good hard numbers.

Personally, I don't think you can go wrong with TweenLite TweenMax, but one thing is for certain: they're all better than the built-in tween classes.

Finding affordable flash media hosting.

CDN/Streaming services, like Akamai Stream OS and Limelight, are great. And if you're going to have a ton of traffic, streaming live events and more, they are indispensable. But what if you have a small project? Or you're just looking to experiment?

Chances are, if you have a small need, Akamai will just point you to one of their partners that they basically resell bandwidth to. There are many of these partners and, in my experience, probably the best thing is to just call Akamai and ask they direct you to a partner that fits your needs.

But there's a big difference when you're calling from a big agency and when you're calling as a freelancer with a small client.

I've experienced both and will say that the latter can often be disheartening. But there are alternatives, which is where Influxis comes in. Don't let the 1992 green on black design fool you. Starting as low as 10 bucks a month, they are perfect if you're just looking to get to know flash media server. At the same time, I've also used them for much larger scale projects (30k+ server connects in 5 days) and they performed wonderfully. 

When big CDNs are overkill, remember that there are reasonable alternatives. I'm sure there are hundreds of other companies like Influxis and if you've had a good experience with one, definitely let us know.

The April 2008 security update for the flash plug-in is coming. And it looks mean, especially if you do a lot of communication between flash and the browser in the form of javascript. While it shouldn't effect those of you already using allowScriptAccess="always", its still worth checking against any flash applications you have out in the wild.

ASDocs and Eclipse: BFF

Face it. Documentation is a total pain. Fortunately, generating it doesn't have to be. And while projects like NaturalDocs make things a little easier (and cleaner) to work with, there's nothing quite like a good ol' Adobe style, frame loving, totally unorganized doc folder.

Seriously, though. Commenting for ASDocs is extremely easy and ultimately a great way to go if there's even the slightest possibility that someone else might look at your code. Plus, it's standard and has a lot of great benefits, like showing up in introspection for those of you developing in FDT 3. And, if you are developing flash/AS3 in Eclipse, it's super easy to set up documentation generation at the click of a button. Screenshots and more after the jump.

AS3 library for the wiimote + mac

default.aspx.jpeg

While the folks at wiiflash.org have done a great job of providing wii functionality in flash, there remains a large-ish gap when it comes to mac support. 

That's where MoteDaemon, an awesome project out of Berlin, comes in. Ultimately, the plan is to integrate the tiny server application with the wiiflash.org library, but it updates have been spotty at best. To fill the gap in the interim, however, we have developed an as3 library based on Sebastian's javascript / as1/2 examples using the XMLSockets.

A very early version is available here and while we may not grow this library much beyond its current state -- hopefully we'll find a way to get into the wii flash library with a mac -- you may find it handy (or at least fun).
AS3 and Flash you'll lose your ink over.