I didn't put much thought into the chaining of the animations.  However what you could 
do is just create one long animation by adding all the paths together:

path1 = [...];
path2 = [...];
path1.concat(path2);
pathanim.playAnimation(path1);

But of course this isn't much help if after playing path1, you want to work with other 
objects as well.

This brings up the possibility of having some higher level object that handle 
sequencing and timelines.

A Sequence object would be fairly simple, could probably work like this:

anim1 = function() {
  pathanim.playAnimation(0);
  imganim.playAnimation(0);
  
  this.keyobject = pathanim;   
  // adds an "pathend" listener to keyobject that starts the next set 
}
anim2 = function() {
  pathanim.playAnimation(1);
  
  this.keyobject = pathanim;
}

sequence.add(anim1,anim2);
sequence.start();

... or something along those lines.  It would take some effort to determine exactly 
what's needed and how it should be used.

A Timeline would probably have to be a different object altogether, and would work 
along the lines of Dreamweaver animation code.  I'm not very familiar with that works 
but I think it would be possible to come up with something that is equally as good.

A Timeline is one master thread that controls many objects.  You can already do such a 
thing manually by using a custom Thread object.  But for a true timeline, you need 
have some logic built in for creating keyframes which are the points where animations 
start and stop.  This is where I got the idea of using some sort of Sprite object 
which would contain some the logic necessary to be added to a Timeline.  I don't have 
a lot of experience with this sort of stuff and unclear about how it should be done.  
If there's some Dreamweaver users that could offer some suggestions about how a 
Timeline should operate I'd like to hear their opinions.  

I do know that one of the complexities involved is to "spread" animations out over a 
longer shorter period.  I made a PathAnimation.lineN() function it produces a slide 
animation that is N frames long (independent of the speed/increment).  It's that sort 
of code that a timeline would need to use for all the animation code.

One goal I've had for a while is to create my own GUI program for doing dhtml 
aanimations (a free Java animator that works like Dreamweaver).  But we need a good 
animation codebase beforehand in order to build a GUI for it.

Dan


On Mon, Dec 11, 2000 at 02:56:21PM -0800, John Sturgeon wrote:
> Hello everybody.
> 
> I'm new to the list, and I'm just catching up to all of the capabilities of
> DynAPI II.  I have a question about pathanim.js.
> 
> I would like to chain one animation after another to create a sequence of
> animations, and I can't seem to figure it out.
> 
> I have looked at the example for pathanim.js, and I figured I could just add
> my second animation sequence somewhere in the 'onpathstop' event, but it
> doesn't seem to work as expected.
> 
> --
> John Sturgeon <><
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> 
> 
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/mailman/listinfo/dynapi-help
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-help

Reply via email to