PDA

View Full Version : °°° help with scrolling imagebar °°°



lampe
September 22nd, 2003, 09:57 AM
hey there,

i made this tutorial where a bar of images is looping from left to right. When i enter the image with my mouse-pointer, the image swoops left (mouse-move to the left) or to the right (mouse-move to the right). But the problem is this: if i hold the mouse-pointer still at the same spot, the image should stop moving. Instead, it continues to loop. How can I solve this? (the image is called 'scrollclip')

onClipEvent (mouseMove) {
xmousepos1 = _xmouse;
ymousepos1 = _ymouse;
if (xmousepos1>xmousepos2 && ymousepos1>-150 && ymousepos1<150) {
_root.scrollclip.nextFrame();
}
if (xmousepos1<xmousepos2 && ymousepos1>-150 && ymousepos1<150) {
_root.scrollclip.prevFrame();
}
if (ymousepos1<-98 || ymousepos1>-33) {
play();
}
xmousepos2 = _xmouse;
ymousepos2 = _ymouse;
}


it should be changed in the last 'if-part'

I tried this: if xmouse1=xmouse2, then stop, else, play
but it didn't work.

Any help is welcome!

lampe(MX)

lampe
September 23rd, 2003, 07:34 AM
i solved the mother****er myself! hell yeah!

the problem was indeed in the last part:
if (ymousepos1<150 || ymousepos1>-150) {
play();
}

The big problem was that the coordinate (0,0) was in the left middle of the movieclip, not in the left top corner...

lampe
:nerd: