Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-25-2012, 04:02 PM   PM User | #1
joenowhere
New to the CF scene

 
Join Date: Apr 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
joenowhere is an unknown quantity at this point
Before and after question

I'm new in Flash, now I want to make a before and after photo gallery, and each set of photo have a bar in it, so user can click on the bar and slide left and right to see the effect before and after, but the problem is I only know the AC for moving the bar but not with the mask, so did any one know how to make the mask move with the bar? Thanks a lot!

Below is the code I have and the SWF file, please help and thanks!

Code:
slider_mc.addEventListener(MouseEvent.MOUSE_DOWN, drag);
stage.addEventListener(MouseEvent.MOUSE_UP, drop);

function drag(e:MouseEvent):void
{
     e.target.startDrag(false, new Rectangle(0,300,800,0));
}

function drop(e:MouseEvent):void
{
     stopDrag();
}

http://www.4shared.com/document/HgJS...and_After.html
joenowhere is offline   Reply With Quote
Old 05-09-2012, 04:28 PM   PM User | #2
dougcollins02
New Coder

 
Join Date: Dec 2011
Posts: 85
Thanks: 15
Thanked 5 Times in 5 Posts
dougcollins02 is on a distinguished road
I think that perhaps an easy way to do this would be to place the "before" graphic over the "after" graphic and just have the slider control the "before" image alpha. Here's a good example of how that works: http://www.flashandmath.com/howtos/sliderstepper/
__________________
What you've just said is one of the most insanely idiotic things I have ever heard. At no point in your rambling, incoherent response were you even close to anything that could be considered a rational thought. Everyone in this room is now dumber for having listened to it. I award you no points, and may God have mercy on your soul.
dougcollins02 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:00 AM.


Advertisement
Log in to turn off these ads.