PDA

View Full Version : Advanced Flash Gallery -- Please help!!


mpalmedo
05-22-2008, 12:13 PM
I am trying to create a gallery that not only has thumbnails, but also allows the person to click on a before and after shot within the one image. For restoration or retouching images I need to be able to thumb through single images, but also be able to do a before and after.

Can someone please help me? I have looked all over the place for a tutorial or something and have come up with zippo.

snickelfritz
06-03-2008, 07:02 AM
I made a loupe-style mouse-move mask that allows viewing of a second image hidden below the visible image.
I realize this is not exactl what you are looking for, but it might get you started.
Example: http://www.byrographics.com/AS3/before_after/before_after.html
FLA: http://www.byrographics.com/AS3/before_after/before_after.fla.zip

Here's the AS3 code:
stop();

pageMap.mapMask.mouseEnabled = true
pageMap.mapMask.buttonMode = true

pageMap.mapMask.addEventListener(MouseEvent.MOUSE_ DOWN, startMove);

function startMove(evt:MouseEvent):void {
stage.addEventListener(MouseEvent.MOUSE_MOVE, pointMove);
}

function pointMove(e:MouseEvent):void {
pageMap.mapMask.x = pageMap.mouseX;
pageMap.mapMask.y = pageMap.mouseY;
pageMap.maskWidget.x = pageMap.mouseX;
pageMap.maskWidget.y = pageMap.mouseY;
e.updateAfterEvent();
}

stage.addEventListener(MouseEvent.MOUSE_UP, stopMove);

function stopMove(e:MouseEvent):void {
stage.removeEventListener(MouseEvent.MOUSE_MOVE, pointMove);
}