ASCII Animation

makluso1

New Member
I'm not sure what I'm missing here in my code. I can't get my clearTimeout to work... I keep getting an error saying myStopFunction() is not defined. Any ideas?I've tried renaming it and checked to make sure that everything matches up, I'm just not sure why I keep getting this dang error!\[code\]<!doctype html><html><head><meta charset="utf-8"><title>ASCII Animations</title><h1> ASCII Animation Editor/Viewer </h1><br><h3> Jordan Keith: Linn-Benton Community College</h3><body><p> Enter the frams below, separated by "=====" <input onclick = "playAnimation();" type="button" id= "Play" value = "http://stackoverflow.com/questions/15469114/PLAY" /><input onclick = "myStopFunction();" type="button" id= "Stop" value = "http://stackoverflow.com/questions/15469114/STOP" /></p><textarea id = "frameArea" cols="50" rows="30"></textarea><textarea id = "displayArea" cols="50" rows="30"></textarea><script src="http://stackoverflow.com/questions/15469114/ASCII.js"></script><br></form></div> </body></html>\[/code\]JavaScript\[code\]function playAnimation(){frameStr = document.getElementById("frameArea").value;if(frameStr.indexOf("\r\n") !=-1){ frameSeq = frameStr.split("=====\r\n");}else{ frameSeq = frameStr.split("=====\n");}currentFrame = 0;showNextFrame();}var t;function showNextFrame() {document.getElementById("displayArea").value = http://stackoverflow.com/questions/15469114/frameSeq[currentFrame]currentFrame = (currentFrame+1)% frameSeq.length;t = setTimeout("showNextFrame();" , 250);}function myStopFuntion() {clearTimeout(t);}\[/code\]
 
Back
Top