I built an animation by the following steps:
1: Saving five x- and y-coordinates from drawing in a canvas in five global variables:
javascript:
[…]
var varNumber = 1;
mycanvas.onmousedown = function(e) {
if (ctx.x == 0 && ctx.y == 0) {
ctx.moveTo(e.clientX, e.clientY);
}
else {
ctx.lineTo(e.clientX, e.clientY);
ctx.stroke();
}
var actualPointX = ‘Point’ + varNumber + ‘x’;
var actualPointY = ‘Point’ + varNumber + ‘y’;
var positionX = e.clientX;
var positionY = e.clientY;
$axure.setGlobalVariable(actualPointX, positionX);
$axure.setGlobalVariable(actualPointY, positionY);
varNumber += 1;
};
2: (OnMove) Setting four points to the first four coordinates
3: Then to the last four coordinates with an animation
4: Start OnMove again by “moving” the button
After generating the HTML files this animation doesn’t work any longer. What is the problem? What can I do?
Thanks!