im new to createJs and would like some help on something I got stuck on. What im trying to achieve is a fade in and fade out animation but I cant seem to get it right or even know if what im doing is in the right direction. Here is the code:
https://jsfiddle.net/kw4ubpxf/
var stage = new Stage($('canvas')[0]);
var car = new Bitmap('http://i.imgur.com/y0Yp1wp.png');
stage.addChild(car)
car.x = 20; car.y = 20; car.alpha = 0;
stage.update();
Ticker.addEventListener("tick", tick);
createjs.Tween.get(car).to({alpha: 1},5000);
function tick(){
stage.update();
}
I need the car image to fade in, stay for 5 seconds and then fade out. Any help would be greatly appreciated.