this is an easy question but I can’t seem to get it right.
Instead of writing this (=an onComplete function):
Tweener.addTween(resultsIntro, {alpha:0, time:0.5, transition:"easeIn", onComplete:func});
function func() {
myResults.removeChild(resultsIntro);
}
I want to write something like this (and it is not working because I don’t know how to write it right):
Tweener.addTween(resultsIntro, {alpha:0, time:0.5, transition:"easeIn",
onComplete:(myResults.removeChild(resultsIntro);)});
because I don’t need this function – how can I write the onComplete code in the same place?
1 Answer