Flashing effect of model item
Hi!
I'm trying to create a flashing effect of a model item without using Illustrate. For example trying to make the component go from originial colour to red to orginial colour to red repeatedly for 5 times as example.
What I was thinking was creating some kind of loop where it blinks on and off repeatedly:
I did something like this:
$scope.blink = function (){
var i;
var timingInterval = 30;
i = 0;
for (i = 0; i < 5; i++){
setTimeout($scope.setWidgetProp(modelItem-1, "color", ""), 500);
setTimeout($scope.setWidgetProp(modelItem-1, "color", "rgba(255,0,0, 1)"), 500)
}
}
Then I linked a click event to a button with hide();
The thought was that the modelItem would blink red on and off for 0.5 seconds for 5 times when clicking that button. Played around with that but it didn't really worked in the preview. So I wonder if someone has done something similiar?


