Question
HELP: Controlling speed of photo slider
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
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