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 8021163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:53:56+00:00 2026-06-04T21:53:56+00:00

I have an Image that’s 5000 pixels by 5000 pixels. It’s scaled up and

  • 0

I have an Image that’s 5000 pixels by 5000 pixels. It’s scaled up and down regularly to fit different parts of the image into the window.

I’m making a function that focuses in on different places on the image (like a map) and then zooms into a certain scale that I specify.

I pass my point into this function (new Point(2000,2500) for example)) however this always breaks because it’s not relative to the image specifically.

How do I make the Point relative to the image at the image’s given scale at any given time?

Additional Info: I’m using the guide here http://www.adobe.com/devnet/flex/samples/fig_panzoom.html for panning and zooming functionality.

Solved:

One of my pitfalls was that I was using a possible bitmapScaleFactor > 1 which would mess up the scaling. This was the final function that worked for my usage.

protected function testFocus(p:Point):void
        {
            var content:ContentRectangle = boardViewer._contentRectangle;
            var panToPoint:PanToPointCommand = new PanToPointCommand(boardViewer, content);
            var scale:Number = boardViewer.bitmapScaleFactor;

            var location = new Point((p.x*scale)+content.x, (p.y*scale)+content.y);             
            var center = new Point(boardViewer.width/2, boardViewer.height/2);

            //Move the point to the center
            panToPoint.fromPoint = location;
            panToPoint.toPoint = center;
            panToPoint.execute();
        }
  • 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-04T21:53:58+00:00Added an answer on June 4, 2026 at 9:53 pm

    I’ve not tested this but how about using the scale factor that is being applied to the image to alter the point coordinates.

    e.g.

    var scaler:Number = 0.5;
    
    image.scaleX = image.scaleY = scaler;
    
    new Point(2000*scaler,2500*scaler);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an image that I get and attempt to load into a graphics
I have an image that is 1024x1024 and is divided into 4 quadrants: I
I have an image that is 480 pixels by 40 pixels. I would like
I have an image that will be centered (left and right) in the window,
I have an image that I want to resize after page load to fit
I have an image that is sliced into 9 images into multiple div. I
I have an image that is 100x100 in pixels. I want to show it
I have an image that is floated to the left that wraps text around
I have an image that the user drew on a canvas and i want
I have an image that I'm trying to load in IE9. I can get

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.