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

interaction between several canvas

New Here ,
Mar 12, 2022 Mar 12, 2022

Copy link to clipboard

Copied

Hello, I am looking for how to make two canvas placed on the same page communicate. On each canvas there is a button (movieclip) to turn on or off a light (movieclip). I'm trying to turn on or off the LED from each button of the two canvas but I don't know how to do it. Thank you for your help.

Views

126

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 ,
Mar 12, 2022 Mar 12, 2022

Copy link to clipboard

Copied

Hi.

 

This sample may help you:

https://github.com/joao-cesar/adobe/tree/master/animate%20cc/html5_canvas/communication_between_ifra...

 

Please let us know.

 

Regards,

JC

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 ,
Mar 17, 2022 Mar 17, 2022

Copy link to clipboard

Copied

LATEST

Hello,
Thanks for your help, exportRoot was needed.

Now I can change frame (gotoAndStop) or change variable value of another canvas :

exporRoot_scriptA.MC_B.gotoAndStop(1);

exporRoot_scriptB.var_A=true;

However, I can't launch a Canvas B function from the Canvas A script. For example: exporRoot_scriptA.function_scriptB(); does not work.

In the console I have the following response: is not a function when calling the command exporRoot_scriptA.function_scriptB();
Thank you in advance for your help.

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