• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

make animation get stop after 15 seconds

New Here ,
Nov 02, 2021 Nov 02, 2021

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");
}
}
TOPICS
ActionScript

Views

171

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 03, 2021 Nov 03, 2021

Copy link to clipboard

Copied

start a ticker loop after clicking, EaselJS v1.0.0 API Documentation : Ticker (createjs.com)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2021 Nov 04, 2021

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();

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2021 Nov 04, 2021

Copy link to clipboard

Copied

LATEST

that won't work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines