very nice Andreas. M.
On 3/7/06, Andreas Weber <[EMAIL PROTECTED]> wrote: > > Actually there are many very interesting uses for code-based Shape > Tweening, one of them is to dynamically morph any shape into any other > shape. > > As for finding the coordinates of the points that define the shape: one > option is a custom, AS based shape editor / drawing tool. Another one is > to draw in the Flash IDE and then extract the drawing data with ASV > (using some code by Peter Hall) or Robin Dubreuil's brilliant JSFL > script sel2Draw (part of an old SDK). > > For translating the points of one drawing to the points of the other one > - we'd need something analogous to the 'shape-hints' in the IDE. > Another, much easier approach, is to just use shapes that have an equal > number of defining points, thus making it easy to map each point to a > point of the new shape. > > In this sample > http://www.motiondraw.com/md/as_samples/t/cards/2006/FlashCard.php > each shape is defined by 60 points - it is then quite straight-forward > to morph each shape into a randomly chosen other shape. > > To make a shape with only 60 defining points look good (smooth) a fast > Catmull-Rom spline was helpful: > http://www.motiondraw.com/md/as_samples/t/CatmullRomSpline/tween.html > > Shape tweens through AS - not as straight-forward as it would be if we > could access the drawing data at runtime, but still possible. > > hth > -------------- > Andreas Weber > motiondraw.com > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Zeh > Fernando > Sent: Montag, 6. März 2006 22:08 > To: Flashcoders mailing list > Subject: Re: [Flashcoders] Shape tweens through AS? > > > >I haven't dug very deeply into the tween class. Anyone know if it is > >possible to do shape tweens with it (or has someone written a custom > >class to do this)? > > Well, short answer: you can't do it. It isn't a matter of building > classes > for it; you can't just modify an existing drawing. > > > There are two things you can do though, depending on what you actually > want > to build: > > 1. build a normal shape tween using the timeline, then use any tween > class/code to control the playhead on that timeline, so you can go back > and > forth on the animation, use different times, etc. > > 2. build objects by code (using the drawing API). Then you'll be fully > able > to animate each of their points separately. This is overkill though and > probably not what you want, since you will not only have to draw all > your > objects by code, but also need to create code to properly translate the > points of one drawing to the other. > > > - Zeh > > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training http://www.figleaf.com > http://training.figleaf.com > > > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com