• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Horizontal scrolling use MOUSE_MOVE event problem

New Here ,
Jul 10, 2012 Jul 10, 2012

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.

TOPICS
ActionScript

Views

480

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 11, 2012 Jul 11, 2012

Copy link to clipboard

Copied

Chances are the problem lies in the code for the scroller that you are not showing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 11, 2012 Jul 11, 2012

Copy link to clipboard

Copied

LATEST

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});

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines