zquirm
2 Dec 2006, 11:26 PM
first off...animator is amazing!
but I'm having a problem, and I know I'm doing something stupid...but I thought I'd ask rather than spend hours working on it, fun as that may be.
I find that after I've run animator, the function that I've called with addCall during the sequence from that point on also runs the animator sequence again...and the more I run it, the more animator sequences run. Obviously it's getting attached to the event that fires the function, but I'm not sure how.
Here's my code:
var animator = new YAHOO.ext.Animator();
var cursor = new YAHOO.ext.Actor('cursor-img', animator);
animator.startCapture();
cursor.alignTo('friend_strip_green', 'tl', [15, 10],true);
animator.addCall(Example.expand,null,this);
animator.pause(.5);
cursor.moveTo(-100, -100, true);
animator.stopCapture();
animator.play();
so, in this case, after the animation has played, every time time Example.expand runs, the animation plays again.
thoughts?
but I'm having a problem, and I know I'm doing something stupid...but I thought I'd ask rather than spend hours working on it, fun as that may be.
I find that after I've run animator, the function that I've called with addCall during the sequence from that point on also runs the animator sequence again...and the more I run it, the more animator sequences run. Obviously it's getting attached to the event that fires the function, but I'm not sure how.
Here's my code:
var animator = new YAHOO.ext.Animator();
var cursor = new YAHOO.ext.Actor('cursor-img', animator);
animator.startCapture();
cursor.alignTo('friend_strip_green', 'tl', [15, 10],true);
animator.addCall(Example.expand,null,this);
animator.pause(.5);
cursor.moveTo(-100, -100, true);
animator.stopCapture();
animator.play();
so, in this case, after the animation has played, every time time Example.expand runs, the animation plays again.
thoughts?