8.30.2006

Flash Player 9 for Linux

Ryan Stewart of ZDNet has an interview with Mike Melanson, the lead engineer behind Adobe's upcoming Flash Player 9 for Linux. It covers what the plans are for the player, what kinds of things won't be in the Linux player that are in the other players, and ways to give Adobe input on the Linux player.

8.24.2006

A few flash games

I've collected a large amount of links to addicting flash games and game sites over the years. They are great timewasters for those boring friday afternoons when you can't wait for your work week to be over with. Here is a list to a few of them, enjoy. :)


Ok this one is shockwave, but I have to link it because its freakin cool what these guys have been able to do with director's built-in 3D engine:

http://www.rasterwerks.com/game/phosphor/beta1.htm

8.23.2006

Sound Visualizer Source Files

Just a quick note to say that I've posted the FLA's for all of the Sound Visualizers. There should be a "view source" link below each SWF that will lead you to the FLA. And, in case you're too lazy to go get them all, here's a list:

8.18.2006

Validating forms in Flex 2

Cahlan and I were able to talk our employer into buying Flex 2 for use in several projects over the last 2 months. Everyone of the projects had forms and needed form validation. There are many different ways to validate forms in Flex. Which can make it hard to know what is the best method to use. Thru trial and error, this is the best and simplest solution I came up with for validating forms in most all situations.

Sample Application

Source Application

8.15.2006

Perlin Noise

Playing around with perlin noise and created a retro, trippy perlin landscape. Download source here.

attachMovie with ActionScript 3.0

So if you're like me, you've probably been toying around with Macrodobia's Flash 9 AS 3.0 Preview. And if you're like me, you're trying to figure out how you are going to migrate from ActionScript 2.0 to 3.0. There is a migration guide that gives some clues to where things are headed, but to be honest, it isn't much help when it comes to learning how to really make the change.

One of the first problems I ran into with F9 Preview is the lack of attachMovie. If you check out that previously mentioned migration guide, it conveniently tells us that this method has been replaced with addChild. Right. So the question becomes: How do I work with assets in the library? The answer (at least as of yet) is fairly simple, if you're familiar with Object-Oriented Programming (which you should be, considering upcoming changes in 3.0) In fact, you may have used similar methods in your library from Flash 8 or before.

So what do you do with your MovieClip in the library? You assign a class to it. Let me show you how.

For example, if I had a MovieClip named mcMenu in my library, with all of it's children MovieClips and assets, I would right-click on mcMenu and select "Linkage." After that, just like before, we select "Export for ActionScript." Notice that now we don't have the option of choosing a linkage ID (identifier) for this MovieClip. We have to specify which class it's using. So all you have to do is make a simple class in the same directory with that name (mcMenu.as) and add some placeholders for your assets. By placeholders, I mean that if you had "mcButton" in your meMenu MovieClip, in your class you would declare the "public var mcButton:MovieClip." That's it. Now when your movie is compiled, you can add a child of mcMenu to your stage.

Here's how you could do that (this would go on the first frame of your movie):

var myMC:MovieClip = new mcMenu;

this.addChild(myMC);

//now you can access that child mc
myMC.mcButton.width *= 2;



There you go!

8.09.2006

BitmapData Effects — Blur/Fade

This is a technique I use a lot in animations, and especially in the sound visualizers that can be found on this site. I had a couple of people asking me how to do this, so I decided to make a post about it. Check it out.




My approach is pretty simple, I use a drawing sprite to draw whatever it is I want to show, and then afterwards use a BitmapData.draw method to get that sprite's information. Then I usually apply two filters to that BitmapData, a ColorMatrixFilter and a BlurFilter. I do this at most once per frame, depending on frame rate or how much I'm already doing per frame.

Source Code