Grant Skinner

The "g" in gskinner. Also the "skinner".

@gskinner

Flash 8: Magnifying Glass Demo

I’ve been prepping for my Macromedia MAX talk, building demos and polishing slides. One of the demos needed a magnifying glass, and rather than just build out a boring square one I decided to go all out with the new expressiveness features and build a nice visual one incorporating a photographed frame, realistic lens shading, lens distortion (with DisplacementMapFilter), alpha masking, and a drop shadow.

I’m still thrilled by how easy it is to do these kinds of advanced effects in Flash 8 (<40 lines of code). This is a quick hack together, but I think I’ll polish, componentize, and release the magnifying glass after the Flash 8 release.

The latest version of the Flash 8 player is required.

Continue reading →

On Design Patterns and Reality

I just read through a blog post by Sho Kuwamoto titled MVC considered harmful, and began typing a comment that quickly became a small essay, so I decided to post it here instead. While I don’t agree with Sho’s idea that MVC is not needed for most RIAs (I think the concepts are valuable for virtually any kind of Flash project, RIAs in particular), I also didn’t agree with some of the more zealous comments about the sanctity of design patterns. Here’s my take on the whole thing…

Continue reading →

Flash 8: Japanese Cherry Blossom Trees

This piece was inspired by cherry trees blossoming in Japan, as well as Japanese ink paintings. I wanted to create a system that grew generative trees where not only were the branches random but also every single blossom. This piece borrows concepts (and code) from my vine-g experiment [source] , as well as my more recent flowerGarden piece. Each tree is drawn randomly following a set of loose rules, and each blossom is also assembled randomly. Establishing rules that resulted in attractive but varied tree structures was definitely the challenge for this piece, and was quite a bit more difficult than I had anticipated. It still draws the occasional mutated tree, but then so does nature.

Continue reading →

Flash 8: Webcam Snowstorm

I’ve been playing a lot with Flash 8’s bitmap features in conjunction with webcams, and will be releasing a few of the resultant experiments over the next week or so. The first of them is pretty simple, though it took some tweaking to get right.

This experiment simulates a snowfall with 400 snowflakes on screen, each with random size, rotation, speed and blur (using BlurFilter). Each of them is independently affected by wind (as partially controlled by your cursor’s x position). That Flash can run it all fluidly is impressive in itself, but of course there’s more. It’s also monitoring the webcam input, detecting edges, and making the snowflakes settle gently on any horizontal surface they encounter – pretty cool.

Continue reading →

Flash 8: Shape Based Collision Detection

Most of the Flash 8 demos released so far using BitmapData have been purely visual, so I thought I should release one of my experiments that focuses on function.

One of the things that Flashers have wanted for years is shape based hit detection – that is, the ability to detect if one shape intersects with another shape. The best we’ve been able to do so far is test a single point against a clip’s shape, which obviously isn’t that great for games with complex interactions.

Flash 8 changes all of that. Unfortunately, it doesn’t give you an easy method to do it (mc.hitTestShape(mc2) would be nice), but it does give you all the tools you need to make it work. In the simple demo below (requires Flash Player 8r50, earlier versions will show whacky graphic artifacts), you can see shape based hit detection at work.

Continue reading →

gProject Panel is Now Available!

We’ve got the panel packaged, the documentation finished, and the reseller system in place. I guess that means we are officially open for business with the gProject panel. Check out the gProject product page for information and pricing.

The gProject panel is a robust replacement for the (rather anaemic) project panel built into Flash MX 2004 and Flash 8 Professional. It incorporates a myriad of time-saving features in a tight, easy to use package.

Continue reading →

Flash 8: Alpha Masks With Blendmodes

One of the things I’ve wanted for years in Flash was alpha masks. That is, masks that have gradations in transparency, not just boolean visible / not visible as with masks in Flash 7. Now with Flash 8 we finally have them… sort of.

Flash 8 doesn’t have actual alpha masks per se, but it does have a blend mode called “alpha” which emulates them. You can place a clip with a blend mode of “alpha” into another clip with a blend mode of “layer”, and the parent clip will use the alpha of the child clip for compositing. This gives you the visual effect of a alpha mask (even if it really isn’t one). It also has a blendmode called “erase” that is basically the opposite of alpha – more opaque areas on the child clip are less opaque on the parent (ie. the child “erases” the parent).

Continue reading →