Rob Barras <[EMAIL PROTECTED]> wrote

> This is potentally a vey east questoin to answer, but
> none the less. How can I copy a motion tween path to
> another sprite so that the 2 objects can grow, shrink
> and spin the same way?

One very easy way is to copy/paste the sprite into another channel and then change the 
other properties, such as the member. (Look at the 'exchange members' menu item which 
also appears in the toolbar or as the keyboard shortcut command-E).

There's no direct way to extract a tween path from a sprite span, but almost.

Paths are stored with a finer resolution than displayed in the score - with key frames 
and bezier curves or some such. (Try extending the span of a location-tweened sprite 
and observe how neatly the new points are added to the path). In the tween settings 
dialog you can adjust the curve in various ways, but none of this data is accessible 
from lingo (why?). This means you have to have (as it were) one keyframe per frame.

So all you really need to do is to go from frame to frame storing the individual 
points in some way. (A list of points is the most obvious structure that springs to 
mind).

It's easy to make behaviors to do this kind of thing, at least it's easy for some of 
us ;) but I can share my own if you need something more than copy/pasting a sprite 
with path:

I made two behaviors with this in mind, one called 'path to field' which does this job 
- you attach it to a sprite, specify the name of the field member you want to create, 
press 'run' once, then remove the behavior. In your cast you'll find a field 
containing a list of points.

The other behavior 'path follower' reads paths stored in fields and moves the sprite 
accordingly. (Actually it's more fancy than that, but I needn't explain further).


Jumping off points for eager/idle lingo heads:

Vectorshape to tweened sprite utility
Tweened sprite path to vector shape utility
Transform path utility (zoom, rotate, skew)

These are all things I wish I had time to make into a tool MIAW, but have never 
actually needed the functionality. Could be nice though.


Brennan
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to