# I am SOOOO new to this I'm dipping chips into my vernix casseosum (javaScript prob)

**URL:** <https://forum.kirupa.com/t/i-am-soooo-new-to-this-im-dipping-chips-into-my-vernix-casseosum-javascript-prob/326446>\
**Category:** Uncategorized\
**Created:** [December 14, 2011, 10:44pm UTC](https://forum.kirupa.com/t/i-am-soooo-new-to-this-im-dipping-chips-into-my-vernix-casseosum-javascript-prob/326446 "2011-12-14T22:44:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rimacy](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@rimacy](https://forum.kirupa.com/u/rimacy)\
**Post date:** [December 14, 2011, 10:44pm UTC](https://forum.kirupa.com/t/i-am-soooo-new-to-this-im-dipping-chips-into-my-vernix-casseosum-javascript-prob/326446/1 "2011-12-14T22:44:54Z")

</div>

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??
