1st of all I am sorry because I am not able to put my question clearly as I am new to use Greensock, below is my code snippet. I hope it will give some more clarity.
HTML:
<div id="mainContainer">
<div id="imageContainer">
</div>
</div>
JS:
var queue = new createjs.LoadQueue(false);
var image = new Array();
var t1;
queue.on("fileload", handleFileLoad, this);
queue.on("complete", handleComplete, this);
$(window).on('load', function() {
queue.loadManifest( [{id:"image1", src:"assets/image1.png"}, {id:"image2", src:"assets/image2.png"}, {id:"image3", src:"assets/image3.png"}] ); // here i am giving N no of images for preloading, for now given only 3 images
tl = new TimelineMax({repeat:-1});
$("#mainContainer").find("#imageContainer").hide();
queue.load();
});
function handleFileLoad(event) {
var item = event.item; // A reference to the item that was passed in to the LoadQueue
var type = item.type;
// Add images to the div.
if (type == createjs.LoadQueue.IMAGE) {
image.push(event.result)// array of images if required in future
$("#mainContainer").find("#imageContainer").append(event.result);// here i am creating vertical filmstip which i want to use to get animation effect
tl.add(TweenMax.to($("#mainContainer").find("#imageContainer"), 1, {y:200}));//here i want to create vertical tween so that i can achieve animation
}
}
function handleComplete() {
alert("LOADING COMPLETE")
$("#mainContainer").find("#imageContainer").show();
// here loading is complete and want to start playing animation
}