var timerId = -1;
var timingInterval = 30; //frequency at which position of widget is updated
//starts moving the model forward
$scope.moveForward = function() {
timerId = setInterval(function () {
$scope.$apply(function () {
$scope.view.wdg[__studioIDofWidget__]['x'] -= .01;
});
}, timingInterval);
}
//stops the position from being updated
$scope.stop = function() {
clearInterval(timerId);
}