Hi Sinious,
Thanks very much for replying to my post. After your reply you got me thinking and I tried your set.visible and that didn't work................but, it got me looking in the right place, plus your mention of memory............................... I wasn't killing my tweens, so they were building up, all works fine and dandy now!! I've posted the code below for your reference.
Again, thanks very much Sinious for your time and effort.
Regards,
Aled Lloyd, thinkplay.tv
if (globalsingle_OSPlatform.OSDesktop == true)
{
pageOutTween = new Tween(page, "x", Regular.easeInOut, page.x, positionXOut, transitionTime, true);
pageOutAlphaTween = new Tween(page, "alpha", Regular.easeInOut, 1.0, 0.0, transitionTimeAlpha, true);
pageOutTween.addEventListener(TweenEvent.MOTION_FINISH, pageOutTweenMOTION_FINISH);
pageOutAlphaTween.addEventListener(TweenEvent.MOTION_FINISH, pageOutAlphaTweenMOTION_FINISH);
//TURNS OFF ALPHA AFTER OUT MOTION FINISHED
function pageOutAlphaTweenMOTION_FINISH(e:TweenEvent):void {
pageOutAlphaTween.removeEventListener(TweenEvent.MOTION_FINISH, pageOutAlphaTweenMOTION_FINISH);
//page.alpha = 0.0;
page.visible = false;
pageOutAlphaTween.stop();// ADDED THESE LINES AND IT NOW WORKS FINE
}
function pageOutTweenMOTION_FINISH(e:TweenEvent):void {
pageOutTween.removeEventListener(TweenEvent.MOTION_FINISH, pageOutTweenMOTION_FINISH);
pageOutTween.stop();// ADDED THESE LINES AND IT NOW WORKS FINE
}
}