function onImageEvent(event:SSPImageEvent) {
if (event.type=="imageRollOver") {
animate(true);
}
if (event.type=="imageRollOut") {
animate(false);
// my_ssp.removeEventListener(SSPImageEvent.IMAGE_ROLLOVER, onImageEvent);
}
}
function onThumbEvent(event:TGRequestEvent) {
animate(false);
}
function animate( show:Boolean ):void {
var end:int = show == true ? 1 : 0;
_tween = new Tween( my_tg, "alpha", Strong.easeOut, my_tg.alpha, end, .5, true );
if( ! show ){
_tween.addEventListener( TweenEvent.MOTION_FINISH, onComplete );
} else {
my_tg.y = 390;
my_tg.alpha = 1;
}
}
function onComplete(e:TweenEvent) {
my_tg.y = 615;
my_tg.alpha = 0;
}
my_ssp.addEventListener(SSPImageEvent.IMAGE_ROLLOVER, onImageEvent);
my_ssp.addEventListener(SSPImageEvent.IMAGE_ROLLOUT, onImageEvent);
my_tg.addEventListener(TGRequestEvent.LOAD_THUMB, onThumbEvent);
Do more with
Premium Content
You need an Expert Office subscription to comment.Start Free Trial