Elasticity1

OK, I’m trying to figure out the elasticity formulae and I’m looking at Robert Penner’s but basically what I’m wondering how’s done is the border elasticity used at www.tokyoplastic.com - some of the best flash I’ve seen.

It’s the borders around the content you see throughout the site I love.

Any ideas anyone has would probably make you very very clever.

Thanks,
Dave

the drum machine was on a thread while ago and it was eventually agreed that that was a frame-by-frame animation… whos to say that the borders wernt done in the same fantastic but time-consuming way?

(assuming you cant work out some AS way of doing it :wink: lol)

Prophet.

Suddenly it doesn’t seem that impressive Flash work but still, it gives you hope that you could create something similar with less work than you might otherwise think.

It does actually make sense that it’s frame-by-frame. Also, the fact it takes so bloody long to load (even over a 512 connection) would suggest that!

So, any help with using this elasticity .as file I’ve found at www.robertpenner.com. I just don’t know how to actually bring it into a Flash movie or how to actually use it! I’ve never actually worked with separate .as files (gasp!)

Its pretty easy to create that border effect. The way I did it only took ten lines of as! First download the extension Movieclip twening prototypes 1.1.7 from http://laco.wz.cz/tween/?page=download. Make sure you have the extension manager. Then create a box or what ever you want to use and turn into a movieclip and give it a instance name of box. Drag two buttons from the components menu and name them one and two.
paste this in the actions panel:

#include "lmc_tween.as"
$tweenManager.broadcastEvents = true;
one.onRelease = function(){
	box.tween('_width', 300,1,'easeoutelastic', 0.5);
	box.tween('_height', 300,1, 'easeoutelastic', 1);
}
two.onRelease = function(){
	box.tween('_width', 10,1, 'easeinelastic', 1);
	box.tween('_height', 10,1, 'easeinelastic', 0.5);
}

It should be a similar effect to that website.

thats very nice…

but im pretty certain he was referring to the bendiness of the border… ifu get what i mean…

Prophet.

http://laco.wz.cz/tween/?page=examples
take look at example “organic zooming window” (6 from bottom)
its based on folowing idea:
i have 8 movieclips (4 corners and 4 center points)
center points use for movement elastic equation and corners normal easing (easeoutexpo or easeoutquad)
then i use random tween duration and random tween delay to move the points, at end i draw the window with drawing api

I know it can be done too without movieclips (using objects or array of points) and without easing equations
And it can be done too without as with shape tween if you dont need different sizes for yourr square

bravo - bit easier than frame by frame :wink:

Prophet.