Image Slider Pan Thing with ScrollRect

I’m not sure if something like this has been posted, I’ve seen requests, and I’ve seen versions on this site and other sites - anywho.

I created a class file for this, all you need is one movieclip containing your image. It uses scrollRect vs. masking. One note, I’m placing button events on the image clip itself, so if you want to pan a movieclip that contains buttons, you’ll have to create a button clip to handle those events. To initiate:

[AS]
import com.McSlider;

var myclip:MovieClip = _root.img;
var myeasing:Number = .5;
var myX:Number = 40;
var myY:Number = 40;
var myviewW:Number = 720;
var myviewH:Number = 520;
var mystartX:Number = ((myclip._width - myviewW)/2); //want the image to start centered
var mystartY:Number = ((myclip._height - myviewH)/2); //want the image to start centered

//new McSlider(yourMovieClip, easing, clipX, clipY, aperature_width, aperature_height, initial_x_Offset, initial_y_Offset);
var nMC:McSlider = new McSlider(myclip, myeasing, myX, myY, myviewW, myviewH, mystartX, mystartY);
[/AS]

To view:
http://flash.creatify.com/experiments/McSlider.html

Download:
http://flash.creatify.com/experiments/McSlider.zip

*******EDIT 09.07.06:
I’ve uploaded a version that accepts buttons within the movieclip - enjoy:
**
**VIEW: **
http://flash.creatify.com/experiments/McSliderB.html
**DOWNLOAD: **
http://flash.creatify.com/experiments/McSliderB.zip

*******EDIT 12.12.06
I’ve uploaded a version that with 3 new public methods:
stopMotion();
startMotion();
slideToPoint(x,y);
**
**VIEW: **
http://flash.creatify.com/experiments/McPan.html
**DOWNLOAD: **
http://flash.creatify.com/experiments/McPan.zip

This is great, but is there anyway it will work in MX 2004?

Hi Creatify, that’s a really nice job u made!! i just wanted to ask u if it’s possible to stop the scroll when i click on a button and then re-start the scroll exactly from the point where the button is (ie where i clicked) (sorry if my question has been asked)
Thank in advance :slight_smile:

Creatify, simply brilliant.

Thanks! :party: