On Fri, 2007-12-07 at 18:59 +0100, Murray Cumming wrote: > > On Fri, 2007-12-07 at 14:16 +0000, Matthew Allum wrote: > > > - I would explain effects before behaviours. They are much easier to > > > grasp. > > I hadn't noticed them before. > > So, what's the advantage of using a behaviour over using an effect? Both > change specific properties via a supplied alpha callback while a > timeline runs. I can see that a behaviour can be applied to multiple > actors, but is that the only difference?
effects are just tiny and simple wrappers around behaviours (if you look at the code, you'll see that an implicit behaviour is created each time and then destroyed). as for the differences: * the effects cannot be reused: only the template can, but the template is essentially a wrapper around timelines and alpha objects * the effects API only has final control points (final opacity, final scale, etc.) * you can only apply an effect to an actor at a time * you cannot change the behaviour of an effect * you cannot create new effects (unless you reimplement the whole machinery) the effects API is mostly convenience for C developers; writing a new behaviour class in, say, Perl or Python is far easier and reusable than using the effects. ciao, Emmanuele. -- Emmanuele Bassi, OpenedHand Ltd. Unit R, Homesdale Business Centre 216-218 Homesdale Rd., Bromley - BR12QZ http://www.o-hand.com -- To unsubscribe send a mail to [EMAIL PROTECTED]
