Hi. I need to linearly tween an object’s alpha to 0
. When I try to do this I get errors such as
Cannot read property 'tween' of undefined
This is my code:
var screen4 = app.root.findByName('Screen4');
var tween = new TWEEN.Tween(this.screen4);
app.on('game:start', function () {
setTimeout(function () {
this.entity.tween(screen4).to({alpha: 0});
// screen4.enabled = false;
}, 1250);
}, this);
what do I need to change to make it so this will work, I have tried debugging but I cannot figure this out Thanks for any help