I'm trying to have an object (ovalShape) to move to a right position when clicked on. I'm using the code snippet from the dashcode library. But I can't seem to get it too work.
Here's the code, tell me if I'm doing something wrong.
When I do click on the object I get an error "can't find variable fadeHandler"
Here's the code, tell me if I'm doing something wrong.
// Values you provide
var itemToMove = document.getElementById("ovalShape"); // replace with ID of element to move
var moveToRightPosition = 100; // new right CSS value
// Moving code
var originalRight = parseInt(document.defaultView.getComputedStyle(ite mToMove, null).getPropertyValue("right"));
var moveHandler = function(a, c, s, f){ itemToMove.style.right = c + "px"; };
new AppleAnimator(500, 13, originalRight, moveToRightPosition, fadeHandler).start();
When I do click on the object I get an error "can't find variable fadeHandler"