|
-
x_mouse
hi,
am stuck on what appears to be a simple thing yet am struggling
trying to make a mouse responsive slideshow (left-right)
cant get it to scroll correctly so one image is centered
fla attached
thanks!!!
---------
xm = 0;
function xpos(bar_length,mul)
{
hpos = 0;
scroll_length = 500;
incr = bar_length/scroll_length;
xm = _xmouse;
if(_xmouse <= 100){xm = 0;}
if(_xmouse >= 2500){xm = 2500;}
scroll_x = hpos - xm;
scroll_x = scroll_x * mul;
x_pos = scroll_x * incr;
x_pos = x_pos + hpos;
return x_pos;
}
_root.onEnterFrame = function ()
{
x_pos = xpos(0,.20);
with (bar)
{
_x += (x_pos - _x)*.2;
}
x_pos = xpos(2500,.75);
with (menu)
{
_x += (x_pos - _x)*.2;
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|