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

onMouseWheel to zoon in and out

New Here ,
Sep 17, 2009 Sep 17, 2009

Copy link to clipboard

Copied

I need help:

How to use onMouseWheel to be able to zoom in and out in the stage?

TOPICS
ActionScript

Views

486

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 ,
Sep 17, 2009 Sep 17, 2009

Copy link to clipboard

Copied

LATEST

You can use MouseEvent.delta property for wheel move direction and change objects' scale accordingly. For instance:

function onMouseWheel(e:MouseEvent):void
{
    myObject.scaleX = myObject.scaleY += e.delta * .1;
}

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