Squeeze Effect Source Code

One of the limiting factors for how much code I release has always been the need to clean up and refactor the code before I make it public. After thinking about it a bit, I decided in the interest of sharing more with the community I would start releasing some of my simpler “proof of concept” type experiments without polishing them first, starting with this one.

A little over a year ago, I put together a simple OSX-esque squeeze effect to transition in dialogs in one of our projects. It never saw the light of day, but I stumbled on the proof of concept yesterday and thought I should share it. It uses DisplacementMapFilter and a simple tween.

Here’s what it looks like:






You can download the source file for Flash 8 here (1MB).

/**

* Disclaimer: This code is a sketch, and has not been polished for public release.

* If you’re using it in a commercial project, you might want to clean it up first.

* If you do so, everyone would appreciate it if you post the result and provide

* a link to it in the comments (or email it to me and I will post with credit to you).

**/

Grant Skinner

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

@gskinner

11 Comments

  1. Sounds great! The link (http://www.gskinner.com/blog/assets/SqueezeEffect.zip) gave a 404, though.

  2. Well… The demo SWF seems to be broken (at least the URL, and the embedding snippet has some strange
    s in it)…

    I think it’s here: http://www.gskinner.com/blog/assets/squeezeEffect.swf

    Thanks for the FLA, though.

  3. Whoops… URLs fixed… darn case sensitivity. 🙂

  4. Outch! Sorry!

    The SWF is back already! And my “br” tag has been interpreted…

  5. Cloud Gate, Millennium Park, Chicago, USA…

    Do I win a prize?

  6. Neat stuff Grant! But you simply MUST upgrade your tools to CS3 ; }

  7. Miles beat me to it.

  8. Very cool stuff. Also thnx to u Scott for the AS3 version 🙂

  9. Thank you for releasing these examples, even in rough form — a lot of us are entirely capable of doing our own tidying, refactoring, and so forth, now that you’ve done all the heavy lifting. Your experiments have always been inspirational — as you release more code, they can also be more educational!

  10. That a nice and simple way of doing the effect. I made a more complex solution with some math. It uses an physics engine to set controllpoints for a bezier surface to create the displacementmapfilter. The priciple with beziersurfaces can be used to comtroll more complex displacementmaps in a simple way.

    http://labs.superkrut.se/?p=13

Comments are closed.