Monday, July 11, 2016

setupbutton (motion)

function stylebutton(button,buttonnumber) {
var styles = document.createAttribute("style")
button.setAttributeNode(styles)
var b = ";bottom:" + (200 + (100 * buttonnumber)) + "%"
var s = "position:absolute;left:0%" + b
s = s + ";width:90%;height:90%;font-size:90%"
s = s + ";color:pink;background-color:lightgrey"
styles.value = s}

function labelbutton(button,label) {
var label = document.createTextNode(label)
button.appendChild(label)}

function linkbutton(button,motion) {
var link = document.createAttribute("onmouseover")
button.setAttributeNode(link)
link.value = "atnbgstartmotion(" + motion + ")"}

function unlinkbutton(button) {
var link = document.createAttribute("onmouseout")
button.setAttributeNode(link)
link.value = "atnbgstop()"}