Copy link to clipboard
Copied
Hi, I have a a thumbnail scroller that scrolls images horizontally and inverted when I move the mouse.
It works fine on its own, and is giving me the results I want, but whenever I put it in my project, it won't scroll properly.
Like, the scrolling is the same, but it doesnt just scroll the thumbnails anymore, it scrolls everything. The background image, page title, etc.
I'm sure I did something wrong, because I think this his been implented before with no problems, any ideas?
P.S When I put the scroller on the main timeline, this problem doesn't happen. It only occurs when I put it within a movieclip.
In the main timeline i have a movieclip named mainContainer.
In the main Container movieclip, frame 1, this the code.
var panelContainer:Sprite = new Sprite;
panelContainer.x = 1500;
addChild(panelContainer);
It moves the panelContainer just fine, but it also moves images and text from the main timeline as well.
Copy link to clipboard
Copied
Chances are the problem lies in the code for the scroller that you are not showing.
Copy link to clipboard
Copied
Sorry, can't believe i forgot that...
addEventListener(MouseEvent.MOUSE_MOVE, onMove);
function onMove(evt:MouseEvent):void{
TweenLite.to(panelContainer, 0.3, { x:-(stage.mouseX/980)*panelContainer.width+2000}); |
}