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.
Copy link to clipboard
Copied
Hi.
This sample may help you:
Please let us know.
Regards,
JC
Copy link to clipboard
Copied
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.