Brand new to javascript over from AS3. I’ve got a canvas element that’s running a simple avoider game(ThankYou Michael James Williams) I’d like to be able to stop it by hitting a button in my main document (from a button spawned inside the body of the main document???)
How can I communicate(maybe set the gameRunning variable inside the javascript file to false or something) with the canvas element from the main doc??