html5 canvas script conflict
i'm hoping someone can help me with this...
this is in html5 canvas. i have a complex movie clip i only want to play through once. with a simple "this.stop();" on the last frame of the movieclip timeline, it worked great. it stopped. only played once.
but then i added some scripting i found to keep the animation synced up with the soundtrack (very important), skipping frames if necessary.
this is on the first frame of the movieclip timeline...
------
var starttime = createjs.Ticker.getTime();
createjs.Ticker.setFPS(24);
this.addEventListener("tick", movealong);
self = this;
this.stop();
function movealong() {
var now = createjs.Ticker.getTime();
var f = Math.floor((now - starttime)/1000*24);
self.gotoAndStop(f);
}
------
so now the animation runs great, keeping up with the soundtrack perfectly, but the clip won't stop at the end. it keeps looping. i've tried every variation i can think of using the stop(); command (this.stop(); self.stop(); this.microdoseclip.stop(); this.parent.stop(); , etc.) , but i haven't gotten anything to stop the clip at the end of its timeline. is it because the movieclip animation is skipping frames? am i missing the script on my last keyframe completely? i think it has to do with the 'this' declaration but i don't know enough javascript to find a work around.
any help would be greatly appreciated!
