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

  • SEARCH
  • Home
  • 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 971247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:55:57+00:00 2026-05-16T02:55:57+00:00

HI, I have container movieclip and one mask layer with the height and width

  • 0

HI, I have container movieclip and one mask layer with the height and width of the current screen. The continer is always bigger than the mask clip. so i need to zoom the container at the center of the mask clip. something link in MicroSoft XL zoom controller at the bottom right.

Does any once have the equation or any other demo links?
Thanks in advance!!!

EDIT 1

private function slider (event:Event) {
    //event.target.value = 0 to 1  
    // possible values are 0, 0.1, 0.2, 0.3, ... 0.9, 1
    // mcMask.x =  mcMask.x = 0;
    // mcMask.width = stage.StageWidth, mcMask.height = stage.StageHeight
    // mcContainer.x and mcContainer.y may vary .. its greater than the mcMask clip. 
    // So its need to be drag on the mask clip. I have placed a lots of images in the container something like map. 
    // If the slider changes the values then the map(mcContainer) need to zoom to scale came from 'event.target.value'.

    // i want to zoom the mcContainer inside the mask, not the mouse cliked point, I want the current center 
    // posistion of the container with resepect to the  mask clip.

    mcContainer.scaleX = mcContainer.scaleY = (event.target.value);
    mcContainer.x = (mcMask.width - mcContainer.width)/2;
    mcContainer.y = (mcMask.height - mcContainer.height)/2;

    // I tried this but if i drag this mcContainer to the left or right it should not locate the center point.
}

any hope??? 🙁

EDIT 2

The Source Code: http://www.4shared.com/file/08X5mG99/AS3_Zooming.html

  • 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-05-16T02:55:58+00:00Added an answer on May 16, 2026 at 2:55 am

    ok then, when you scale around a point, you have to know where the point is relatively, and then scale that up with the same scale as the clip you are resizing. therefore something like this should work (note, this isnt tested, but try tweaking it around a bit):

    — EDIT —

    private function zoomContainer (event:Event):void {
            var relativeZoom:Number = event.target.value / mcContainer.scaleX;
    
            var origin:Point = new Point(stage.stageWidth/ 2, stage.stageHeight / 2);
            var centerPoint:Point = mcContainer.globalToLocal(origin);
            centerPoint.x *= relativeZoom;
            centerPoint.y *= relativeZoom;
            var newCenterPoint:Point = mcContainer.localToGlobal(centerPoint);
            var offset:Point = origin.subtract(newCenterPoint);
    
            mcContainer.x += offset.x;
            mcContainer.y += offset.y;
            mcContainer.scaleX *= relativeZoom; 
            mcContainer.scaleY *= relativeZoom;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a container MovieClip that serves as a content area that I need
let's say I have two shapes wrapped in Movieclip container. How can I detect
I have a container with a height of 100% so the height will be
I have an movieClip Container and I want to move all its children into
i have two movieclips container. MovieClip_1 MovieClip_2 now MovieClip_1 contains one child _child_1. now
I have created 3 movieClips and I added into another movieClip container named as
I have a container div that is set to 90% width. I have a
I have a list of buttons: agreeButton disagreeButton container.clickButton1 container.clickButton2 Container is another movieclip
I have container of geometrical entities. Let's assume there is circle, ellipse, line, arc.
I have a container div (red) with a top padding of 400px. The content

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.