Copy link to clipboard
Copied
Switching left and right using the same movie clip slows down the frame when converting to html5. So I'm using two movie clips each time I reverse the same image source. Is there any workaround? Is movie clip reversal taking a lot of work on html5?
not really. this runs perfectly well:
var f1=f.bind(this)
createjs.Ticker.addEventListener('tick',f1);
function f(){
if(this.a.scaleX>-1){
this.a.scaleX-=.05;
} else {
createjs.Ticker.removeEventListener('tick',f1);
}
}
Copy link to clipboard
Copied
not really. this runs perfectly well:
var f1=f.bind(this)
createjs.Ticker.addEventListener('tick',f1);
function f(){
if(this.a.scaleX>-1){
this.a.scaleX-=.05;
} else {
createjs.Ticker.removeEventListener('tick',f1);
}
}