Set the drawing element visible option to a variable say showWhatever to make objects appear and disappear when the Boolean showWhatever is control in the checkbox.
Example http://iwant2study.org/ospsg/index.php/interactive-resources/physics/04-waves/04-light/116-thinlenmodel05