Groups | Blog | Home
all groups > flash actionscript > may 2004 >

flash actionscript : shape tweening by actionscript



numem
5/18/2004 10:56:53 PM
hi guys,
could you please guide me how to do shape tweening in actionscript , i
searched in APIs for some movieclip.moveto action but there is nothing like
that. can u tell me how to do it?

thanks in advance.
Peter Blumenthal
5/19/2004 10:26:27 AM
You can't use aS for shape tweening. The best you can do is create an mc
with the shape tween, and control the frame of the mc via aS.

--
---------------------------------------
http://www.phageinteractive.com
PhageInteractive Ltd.
remove mm_ to mail
---------------------------------------
'If I come across as a grumpy and twisted old man, it's just because I'm a
grumpy, twisted, old man." - me
---------------------------------------

Shan-Dysigns
5/20/2004 2:22:14 AM
Peter Weidauer
5/20/2004 2:49:36 AM
On 2004-05-19 11:26:27 +0200, "Peter Blumenthal"
<mm_pete@phageinteractive.com> said:

[quoted text, click to view]

Well, you can do something similar to tweening as long as your shapes
aren't to complex.

1) define coordinates of source and target shape 2) calculate
intermediate points depending on how many steps you want 3) draw every
single step of your tween using mc.lineTo() and mc.curveTo().

I did this once (see link below). Every page of this small site uses a
different trapezoid shape with rounded corners as background. When you
switch between the pages these shapes morph into each other. I didn't
want to create
10 different animations for all the possible transitions between the 5
pages so I scripted it.


www.sfp-security.de/flash.html
Peter Blumenthal
5/20/2004 8:33:02 AM
Yeah, that's quite nice ;)

As you say though, it's *similar* to shape tweening. I think you would have
a much harder time trying to use this method to tween for instance an
iscocelese triangle into a round-cornered trapeziod...

--
---------------------------------------
http://www.phageinteractive.com
PhageInteractive Ltd.
remove mm_ to mail
---------------------------------------
'If I come across as a grumpy and twisted old man, it's just because I'm a
grumpy, twisted, old man." - me
---------------------------------------

..

Peter Blumenthal
5/24/2004 12:59:18 AM
haha - you nutter! I like it. ;)

--
---------------------------------------
http://www.phageinteractive.com
PhageInteractive Ltd.
remove mm_ to mail
---------------------------------------
'If I come across as a grumpy and twisted old man, it's just because I'm a
grumpy, twisted, old man." - me
---------------------------------------

Peter Weidauer
5/24/2004 1:03:17 AM
Peter, you were right about the hard time, but since you asked for it:

www.zapferpeter.de/Tween-Machine/

;)
AddThis Social Bookmark Button