massekotti

03-17-2002, 08:52 PM

I'm making an image scroller with the following actionscript to get it to react to mouse movement. Hard to explain...see url http://www.sixways.tv/imagescroll.htm

Here is the actionscript...

// hmv-=movie width

hmv = 548;

hmn = getProperty("/menu", _width);

y = getProperty("/drag", _y);

x = getProperty("/drag", _x);

// define where active

if (Number(x)>0 and Number(x)<548 and Number(y)>0 and Number(y)<70) {

setProperty ("/menu", _x, Number(-x*hmn/hmv)+Number(x));

}

What would I add to give it acceleration and deceleration characteristics?

Here is the actionscript...

// hmv-=movie width

hmv = 548;

hmn = getProperty("/menu", _width);

y = getProperty("/drag", _y);

x = getProperty("/drag", _x);

// define where active

if (Number(x)>0 and Number(x)<548 and Number(y)>0 and Number(y)<70) {

setProperty ("/menu", _x, Number(-x*hmn/hmv)+Number(x));

}

What would I add to give it acceleration and deceleration characteristics?