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

Adobe animate canvas code

New Here ,
Jul 08, 2023 Jul 08, 2023

Copy link to clipboard

Copied

How do i target a variable on frame 1(let score = 0) from buttons on other frames Thanks 

 

Views

84

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 ,
Jul 08, 2023 Jul 08, 2023

Copy link to clipboard

Copied


/* Code to get the frame number of the current frame
*/

var frameNumber = this.currentFrame;

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 ,
Jul 08, 2023 Jul 08, 2023

Copy link to clipboard

Copied

LATEST

reference the timeline.

 

eg, to assign a variable:

 

this.var1="hi";

 

to retrieve that variable after it's been assigned:

 

console.log(this.var1);  // if code on the same timeline

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