get embed code close copy Number of Balls (2-12) Background Color Ball Color Bar Color String Color Speaker Color (()={ const editForm = document.getElementById("editform"); const editLink = document.getElementById("editlink"); const closeLink = document.getElementById("closeform"); const toggleForm = (e)={ if(editForm.style.display == "block"){ editForm.style.display = "none"; editLink.style.display = "inline"; }else{ editForm.style.display = "block"; editLink.style.display = "none"; } } editLink.addEventListener("click", toggleForm); closeLink.addEventListener("click", toggleForm); document.getElementById('btnCopyCode').addEventListener("click", () = { const copyText = document.getElementById("textBoxEmbedCode"); copyText.select(); copyText.setSelectionRange(0, 99999); document.execCommand("copy"); }); const updateGadget = () = { const inputs = document.querySelectorAll("#editcontrols input, #editcontrols select"); const arrVars = []; for(let i = 0; i { document.getElementById("textBoxEmbedCode").value = ``; }; const getPref = (pref, flashVars) = { let prefs = flashVars; let s1 = prefs.indexOf(pref); let val = ""; if (s1 != -1) { s1 += pref.length + 1; val = prefs.substring(s1, prefs.length); val = val.substring(0, val.indexOf("&")); } return val; } const updateIFrame = (flashVars) = { let bgcolor = "FFFFFF"; let up_backgroundColor = getPref("up_backgroundColor", flashVars); if(up_backgroundColor != ""){ bgcolor = up_backgroundColor; } if(flashVars == ""){ flashVars = "up_backgroundColor="+bgcolor; } let iframe = document.getElementById("gadgetiframe"); iframe.src = "\/widgets\/newtonscradle\/?"+ flashVars; } const inputs = document.querySelectorAll("#editcontrols input, #editcontrols select"); for(let i = 0; i For every action there is an equal and opposite reaction. Created in 2008 with Flash/Actionscript.