I'm attempting to create a gallery viewer similar to the Apple on here:
http://www.apple.com/ipad/
Where the slide indicators are linked with the forward and back arrow controls.
What i have is my forward and back arrows controlling the content, newsHolder MC.
I also have the dot indicators controlling the newsHolder MC correctly.
But what i can't figure out is how to link the forward and back arrows to sync with the dot indicators?
PHP Code:
function dotPressHandler (e:Event):void {
changeIt(e.currentTarget.id);
//current selection history code
if (currentButton) {
TweenMax.to(currentButton.dotCenter, 0.25, {removeTint:true, ease:Expo.easeOut});
locked = true;
currentButton.mouseEnabled = true;
}
currentButton = e.currentTarget as MovieClip;
TweenMax.to(currentButton.dotCenter, 0.25, {tint:0xFF0000, ease:Expo.easeOut});
locked = false;
currentButton.mouseEnabled = false;
}
function changeIt(pict:Number):void {
trace(pict);
TweenMax.to(newsHolder, 0.5,{ x:-(pict * newsWidth), ease:Expo.easeOut, onComplete:unlockTween});
}
function fwdHandler (e:Event):void {
if (lockStrip == false) {
lockStrip = true;
newsCurrentX = newsHolder.x;
newsNewX = newsCurrentX - newsWidth;
TweenMax.to(newsHolder, 0.5,{ x:newsNewX, ease:Expo.easeOut, onComplete:unlockTween});
}
}
function bckHandler (e:Event):void {
if (lockStrip == false) {
lockStrip = true;
newsCurrentX = newsHolder.x;
newsNewX = newsCurrentX + newsWidth;
TweenMax.to(newsHolder, 0.5,{ x:newsNewX, ease:Expo.easeOut, onComplete:unlockTween});
}
}
function unlockTween():void {
lockStrip = false;
}