-
FK Romeo
Zoom from center of stage
Hi guys,
I know this question has been asked a million times now but even after searching through scores of pages, I have not been able to get an answer for my problem.
I have a big movieClip which the user can zoom by click on a 'zoom-in' button. Once zoomed the user can click on that movieclip and pan it. Now the center of that movieClip is displaced and no longer where it was before. However, if the user click on 'zoom-in' now again, the movieClip should zoom from the center of the stage and not from the movieClip's center.
To put it simply, I want a formula which will zoom a movieClip from the center of the stage and not from its registration point, no matter where the registration point is.
Please help!!
Thanks.
sameer rao
there...you see!!
-
8 years later, I'd still like to see an answer to this. Anyone got one?
-
This is exactly what I was looking to do too! And I just figured it out...this isn't a scripting issue, but how you build it. I placed a map movie clip inside another movie clip called map container. If you use the map mc for dragging/navigation and the map container mc for zooming, the map always stays centered. It zooms off the "camera" (map container mc) and not the map's registration point (map mc).
I hope this is what you were asking. I'd demonstrate, but it's not completely finished yet. But the zoom does work like it's supposed to!
-
Yahoo! Dynamic Registration Class
Code:
var p:Point = new Point();
p.x = 100;
p.y = 10;
DynamicRegistration.move(map, p, 0, 0);
DynamicRegistration.scale(map, p, 2, 2)
;
http://code.google.com/p/flexwires/s...egistration.as
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|