Topic: Thumbnail Opacity Question
Hi guys.
So I've figured out how to make the thumbnails at 50% alpha, and then when clicked on, appear at 100%. Here's the code from thumbs.as
private function enableMouseActions(){
mClip_mc.onRelease = Delegate.create(this,onRelease);
mClip_mc.onPress = Delegate.create(this,onPress);
mClip_mc.onRollOver = Delegate.create(this,onRollOver);
mClip_mc.onRollOut = Delegate.create(this,onRollOut);
mClip_mc.onDragOut = Delegate.create(this,onDragOut);
mClip_mc._alpha = 50;
mClip_mc.useHandCursor = false;
}
private function onRelease(){
if (mSelected ) return;
mBase_mc._x -= Options.thumbnailClickShift;
mBase_mc._y -= Options.thumbnailClickShift;
mThumbArea.selectedThumbIndex = mIndex;
}
private function onPress(){
if (mSelected ) return;
mBase_mc._x += Options.thumbnailClickShift;
mBase_mc._y += Options.thumbnailClickShift;
}
private function onRollOver(){
if (mSelected ) return;
mFrameTwn.continueTo(Options.thumbnailRollOverFrameWidth,sFrameTweenLen);
if (Options.showCaptionOnRollover) mStageManager.showCaption(mIndex);
new Tween(mFrameTwn,"_alpha",null,Options.thumbnailLoadingAlpha,100,10,false);
}
private function onRollOut(){
if (mSelected ) return;
mFrameTwn.continueTo(Options.thumbnailFrameWidth,sFrameTweenLen);
if (Options.showCaptionOnRollover) mStageManager.showCaption(mImageArea.currentImageIndex);
}
private function onDragOut(){
if (mSelected ) return;
onRollOut();
onRelease();
}
public function select(){
mSelected = true;
mClip_mc._alpha = 100;
mImageArea.showImage(mIndex);
drawFrame();
if (mImageLoaded) mViewedIcon_mc._visible = true;
if (!mImageLoaded) mImageArea.loadImageOutOfSequence(mIndex);
}
public function unselect(){
mSelected = false;
mClip_mc._alpha = 50;
if (mClip_mc.hitTest(_root._xmouse,_root._ymouse)){
drawFrame();
}else{
mFrameTwn.continueTo(Options.thumbnailFrameWidth,sFrameTweenLen);
}
}
Now I'm wondering if someone can help me figure out how to FADE into these alphas? Can't seem to figure this one out.
Thanks!!!
Jared