I am trying to marry my training and knowledge of JavaScript with the Hype 4+ interface.
As I am new to JS and the code portion of Hype, I am have difficulty understanding where/ how to create & insert the JavaScript values and elements in the Hype 4+ document (e.g. HTML Head/ creating the function), as this function is not working on the browser.
Remove all the stuff from the head. Then create a rectangle and give the ID to it. Add a button to the stage and run your second Screenshot from it but without the function wrapper. That should do it.