- Home /
Question by
goo-muffin · Oct 01, 2013 at 03:34 PM ·
animationfunctionitween
Function after iTween animation finished
Hi!
In javascript, how can I do a function that is executed once after an iTween animation has finished?
like
function something()
{
//Do something
}
function Update()
{
iTween.MoveTo(GO, iTween.Hash("x", 0), something);
}
Comment
Answer by TimXT · Oct 01, 2013 at 04:41 PM
Umm, have you tried this?
iTween.MoveTo(GO, iTween.Hash("x", 0, "oncomplete", "something", "oncompletetarget", this.gameObject));
OnComplete specifies the name of the function which is to be called when it completes. There are other similar ones too, like OnStart etc. You can find everything here: http://itween.pixelplacement.com/jsarchive.php
Your answer
Follow this Question
Related Questions
fixing choppy animation when using itween 0 Answers
iTween - calling functions on oncomplete doesn't work if the function is declared as a variable 1 Answer
iTween — Possible to animate then return back to original? 1 Answer
iTween: How to animate other shader-color values besides the main Color? 1 Answer
Simple question about iTween with float 0 Answers