Description: I am building a project with a Scrolling Horizontal MC. You can see an example at www.teamxposure.com/hemi … At present when the scrolling images load they don’t move in either direction. When the mouse is placed on the project the scroller moves in the correct direction or pauses if mouse is centered … this all works great.
What I need is … when the MC loads I would like the images to start to scroll slowly from the right to the left. When the mouse is placed on the images the original navigation would then take place.
I am just learning AS and had help by a friend, unfortunatley he is out of town and I really need to finish this project. So while I understand “some” AS … please “assume” I know “little” (ty).
I don’t know that attachment limits (size) … if it can be loaded I will.
The script I have for the MC is as follows:
Stage.align = "TL";
Stage.scaleMode = "noScale";
Stage.showMenu = false;
var docWidth = Stage.width;
var stopping = false;
var dx = 0;
var damping = 0.9;
var speed = 10;
function moveSlider() {
slide._x += dx;
if ((!stopping) && slide.hitTest(_root._xmouse, _root._ymouse, false)) {
dx = speed*(docWidth-_root._xmouse*2)/docWidth;
} else {
dx *= damping;
}
if (slide._x>=0) {
slide._x -= slide._width/2;
} else if (slide._x<slide._width/-2) {
slide._x += slide._width/2;
}
}
slide.onEnterFrame = moveSlider;
I have played with the dx var, but it does not seem to work. If I put the number 10 it will start the scroll, but stops rather quickly. If I put the number 100, it will scroll a little longer but also stops.
I “think” if I was to put an onClipEvent handler on the scrolling conveyor image it might work, but nothing I have tried seems to.
Any help would be great … thanks!
Another quick question … when the movie is played there is one spot in the conveyor that has a jump to it. What would cause this? I would understand if the MC was tweened, but it is scripted on a conveyor so it doesn’t make sense to me.
Thanks again.