html5 coding: start creatjs.tween at a special time (automatically)
Hi there!
The image „Mov_Image_Inst“ should be visible, scale and rotate between minute 30 to 31 (and this every new hour again).
This is my coding:
var _this = this;
var d = new Date ();
var M = d.getMinutes();
var S = d.getSeconds();
this.Mov_ImageTween_Inst.visible = false;
if (
M >= 30 && M<31 && S >= 0 && S <59
) {
this.Mov_ImageTween_Inst.visible = true;
this.Mov_AffiTween_Inst.alpha = 0;
createjs.Tween.get(this.Mov_ImageTween_Inst)
.to({alpha:1, scaleX: 2, scaleY: 2}, 1000)
.to({rotation: 360}, 5000)
.to({alpha:0, scaleX: 1, scaleY: 1}, 1000);
};
The code is almost correct, but the tweening doesn´t start automatically between minute 30 to 31, a website refresh is needed. How can I get the tween to start at the right time automatically? Visiblity scaling and rotation between minute 30 to 31 works after website refresh only but not automatically.
Any help is appreciated.
Thank you in advance.
Cheers. Henry
