Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8115757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:34:17+00:00 2026-06-06T03:34:17+00:00

Is there any (straightforward) way to solve the dynamic registration issue with multitouch scaling

  • 0

Is there any (straightforward) way to solve the dynamic registration issue with multitouch scaling events in flex? I just can’t wrap my head around this.

What I’ve got is (amongst some lines and labels) a path in a group that itself is wrapped in a scroller;

<s:Scroller id="scroller">
    <s:Group id="scrollerContent">

    <s:Path id="path">
        <s:stroke>
            <s:SolidColorStroke color="#ffffff" weight="2"/>
        </s:stroke>
        </s:Path>
    </s:Group>
</s:Scroller>

What I’d like to do is to zoom in and out on the path (and the other stuff in the scrollerContent group), so in my creationComplete() method I added an eventListener to the scrollerContent group:

scrollerContent.addEventListener(TransformGestureEvent.GESTURE_ZOOM, zoomEvent);

Here is the code Christophe Coenraets provided for his chart example (which does in fact scale the path, based on x=0 though;

private function zoomEvent(e:TransformGestureEvent):void
{
    zoom(e.scaleX, e.scaleY);
}
protected function zoom(scaleX:Number):void
{
     var w:Number = path.width * scaleX;
     if (scaleX>1)
        path.width = w > width*5 ? width*5 : w;
     else
     {
          path.width = w < width ? width : w;
          if (path.x + path.width < width) path.x = width - path.width;
      }
}

I’m aware of the DynamicRegistration class, but can’t get it working properly, it still scales the path based on the x=0 point.

DynamicRegistration.scale(scrollerContent, new Point(e.localX, e.localY), scrollerContent.scaleX*= e.scaleX, scrollerContent.scaleY=1);

Any help regarding this would be much appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T03:34:19+00:00Added an answer on June 6, 2026 at 3:34 am

    I used the DynamicRegistration class, and got it working like this, if you’re still interested:

    protected function onZoom(e:TransformGestureEvent, img:Image):void
    {
        DynamicRegistration.scale(img, new Point(e.localX, e.localY), img.scaleX*e.scaleX, img.scaleY*e.scaleY);
    }
    

    Or with the native flex method:

    protected function onZoom(e:TransformGestureEvent, img:Image):void
        {
        img.transformAround(new Vector3D(e.localX, e.localY, 0), new Vector3D(img.scaleX*e.scaleX, img.scaleY*e.scaleY, 0));
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well my question is simple and straightforward. Is there any way we can use
Is there any straightforward way of finding a key by knowing the value within
Is there any way I can run class files (i.e. with main as the
To anyone who uses Nivo Slider, is there any straightforward way (or not) to
Is there any straightforward way to change the case of any URL using mod_rewrite?
Is there a straightforward way to get the index of an item I just
I am using log4net for logging. Is there any straightforward way to parse result
I was wondering if there is any straightforward way to encrypt text or string
My question is really straightforward, is there any way of fetching data from a
Is there any straightforward way to get the mantissa and exponent from a double

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.