Copy link to clipboard
Copied
hello community i want to make animation on canevas but i have some deficault to do i, i wanna make the L1,L2,MINUTERIE2..... GET off after 15 seconds after click on bp1 or bp2.
thanks
this.bp1.addEventListener("click",switchf.bind(this));
this.bp2.addEventListener("click",switchf.bind(this));
this.bp3.addEventListener("click",switchf.bind(this));
stage.enableMouseOver(10);
this.on("mouseover",function(){ this.cursor = "pointer"; });
function switchf(e){
if (this.L1.currentLabel == "off" ){
this.L1.gotoAndStop("on");
this.L2.gotoAndStop("on");
this.minuterie1.gotoAndStop("on");
this.minuterie2.gotoAndStop("on");
this.minuterie3.gotoAndStop("on");
} else {
this.L1.gotoAndStop("off");
this.L2.gotoAndStop("off");
this.minuterie1.gotoAndStop("off");
this.minuterie2.gotoAndStop("off");
this.minuterie3.gotoAndStop("off");
}
}
Copy link to clipboard
Copied
start a ticker loop after clicking, EaselJS v1.0.0 API Documentation : Ticker (createjs.com)
Copy link to clipboard
Copied
There's a much more simple solution, all you need to do is to type this line of code at the frame that reaches the 15 second mark:
stop();
Copy link to clipboard
Copied
that won't work.