Skip to main content
Participant
June 26, 2006
Question

HELP: Controlling speed of photo slider

  • June 26, 2006
  • 2 replies
  • 242 views
I need some help in controling the speed of this simple photo slider. Here's what I have.

Individual movie clip(Photo):
onClipEvent (enterFrame) {
_root.xdist = (_root._xmouse-_root.xcenter)/20;
}

Main Action:
movieWidth = 300
xcenter = movieWidth/2
// this code loops right
function movePiece (target) {
with (target) {
_x += xdist;
if (_x>movieWidth+_width/2) {
_x = -_width/2;
}
if (_x<(0-_width/2)) {
_x = movieWidth+_width/2;
}
}
}

What action code, etc. can I put into this code to slow down the scrolling or control the scroll speed? Any help would be appreciated! Thanks
This topic has been closed for replies.

2 replies

brentamAuthor
Participant
June 26, 2006
Thanks, I can't believe I missed that. That worked. The higher the # the slower.

Thanks-B
Inspiring
June 26, 2006
I think you could change the /20 to something bigger or smaller...