Lacoste Media Group

here is some script from one of my projects that should help you out, just substitute your object’s instance names for mine (i.e. your dragger, scroll bar, etc.). at the very least this code should point you in the right direction. i really like your design by the way, and if you need help with that contact form to come just ask.

var space:Number = 40; //------------------------> STORES SPACE AT BOTTOM OF innerPageTarget AFTER SCROLLING
var friction:Number = 0.6; //--------------------> STORES AMOUNT OF RESISTANCE TO SCROLLING
var speed:Number = 6; //-------------------------> STORES SPEED OF SCROLLING
var top:Number = innerPageTarget._y + 1 ; //-----> STORES INITIAL Y POSITION OF innerPageTarget
// BOTTOM IS THE NEW VALUE GENERATEED FOR THE LOWEST VISIBLE PORTION OF SCROLLED DATA
   // the innerPageTarget is the clip being loaded into
var bottom:Number = innerPageTarget._y + mask._height - innerPageTarget._height - space;


// GENERATE SCROLL EASING
MovieClip.prototype.scrollEase = function() {

	this.onEnterFrame = function () {
					
		if (Math.abs(dy) == 0 && drag == false) {
			
			delete this.onEnterFrame;
			
		};
	
		r  = this._y /( scroller.bar._height - this._height );
		
		dy = Math.round ((((top - (top - bottom) * r) - innerPageTarget._y) / speed )* friction + .3);
	
		innerPageTarget._y += dy;
	
	} ;	
	
};

// INITIATE DRAG AND ALLOW SCROLLING
scroller.dragger.onPress = function() {

	drag = true;

	this.startDrag( false , this._x , 0 , this._x , scroller.bar._height - this._height - 1) ;

	scroller.dragger.scrollEase();

} ;

// DISABLE DRAG AND DISALLOW SCROLLING
scroller.dragger.onRelease = function () {

	drag = false ;

	this.stopDrag () ;

} ;

};

mouseListener.onMouseWheel = function (delta:Number) {

if (_root.pageTarget.mouseHitArea.hitTest(_root._xmouse, _root._ymouse, false)) {
	
	scroller.dragger._y -= delta;
	
	// 0 is the utmost top and where the dragger must stop
	if (scroller.dragger._y >= 0) {
		
		drag = false;
		
		scroller.dragger.scrollEase();
		
	}else{
		
		scroller.dragger._y = 0;
		
		return;
		
	};
	
	// scroller.bar._height is utmost bottom and where the scroller must stop
	if (scroller.dragger._y <= scroller.bar._height) {
		
		drag = false;
		
		scroller.dragger.scrollEase();
		
	}else{
		
		scroller.dragger._y = scroller.bar._height;
		
	};
	
	updateAfterEvent();
}; 

};

// ADD LISTENER TO RECOGNIZE MOUSE WHEEL ACTION
Mouse.addListener(mouseListener);

^^ Think that’s the single most used AS2 scroller. The guy that originally wrote it never gets any creds :wink:

Besides I think this site is in AS3, no?

if i’m not mistaken the original version was created by robert penner, but not entirely certain.

oh, and i think penner wrote/inspired most of the tween classes for flash as well, but again not 100%.

thank you for your help! and im glad you like the design. il get on that quick time! and no its on as2

_name

do you have a .fla with that code cant seem to get it to work if you able to do a scroller quick time with the mousewheel scroll working for me to look at would be wonderful!

I hate it with a passion when sites have 2 preloaders. And one was just for the splash screen. If you need a loader for the splash screen then you don’t need that particular splash. Also it took me far too long to find your scroll bars. I am not too sure why this is even done in flash. But eh. The colors are vivid tho, scattered. layout is okay as well. Nothing to write home about but it works if you fix the scroll. But I would use Jquery vs what you have here.

Design is good, I liked it great colors… great job. But usability is not good also interactivity not good.

BTW, where’s the crocodile?

why would i have the crocodile?.. sure its LACOSTE… cus its my last name… im sure some how im related but not allowed to use it xD or am i…