Hi!
I’m currently developing my first AS3 site for my friends’ band and I would appreciate some help from you!
As you can see here http://www.lpfmultimedia.com/theransack , on the gallery section, the thumbnails scroll a bit wierdly… Below is the code I made for it… Do you have some suggestions??
//THUMBSMC SCROLL
private function thumbsMcRollOver(event:MouseEvent):void {
addEventListener(Event.ENTER_FRAME, thumbsEnterFrame);
}
private function thumbsEnterFrame(event:Event):void {
//left movement
if (mouseX > ((stageWidth/2) - (stageWidth/2)*0.90)) {
if ((thumbsMc.x + thumbsMc.width) <= stageWidth) {
thumbsMc.x = stageWidth - thumbsMc.width;
} else {
thumbsMc.x -= 10;
}
}
//right movement
if (mouseX < ((stageWidth/2) + (stageWidth/2)*0.90)) {
if (thumbsMc.x >= 0) {
thumbsMc.x = 0;
} else {
thumbsMc.x += 10;
}
}
//Remove event listener
if (mouseY > (thumbsMc.y + thumbsMc.height) || mouseY < thumbsMc.y) {
removeEventListener(Event.ENTER_FRAME, thumbsEnterFrame);
}
}