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

Zoom & Pan

Participant ,
Mar 30, 2014 Mar 30, 2014

I have a new project at work that I want to improve the interactivity on. Let's say I have a country map with icon-buttons representing cities.

Click on a button, and you zoom in and pan across to that city, close up.  (Not unlike searching on Google maps.)  A talkbox of information appears, including a X close button, which would return you to the zoomed out and centered state or position. 

How can I do this?

I imagined using different MC's, placed on frames across the timeline. Click on a button, go to frame _ and play the MC.  The MC would include the zoom in and pan (transform scale and position).

But what if I could use Flash "math" to zoom directly into the city, not MC involved?  How do I script that?

Anyone?

Thanks so much.

TOPICS
ActionScript
602
Translate
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
Community Expert ,
Mar 30, 2014 Mar 30, 2014

i think that would be easier and more satisfactory to use code instead of timeline frames.  each city could be a child movieclip (transparent works, too) of the main map parent.

when a you want to zoom and/or pan to a city, you would determine how much its x and y need to change to center it on-stage.  you would then apply that transform to its parent map.

Translate
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
Participant ,
Mar 30, 2014 Mar 30, 2014

Great, and I agree.

Care to elaborate?  Or maybe direct me to a script library somewhere?

I'm currently looking here:

http://www.flashandmath.com/

I'll search for parent and child techniques, which I've never done yet. 

Thanks again.

Translate
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
Community Expert ,
Mar 31, 2014 Mar 31, 2014
LATEST

if you want to hire me to help send an email via http://www.kglad.com > contact

for free help continue posting here. 

if you're willing to try this yourself and hit specific snags, you should be able to complete this with free help here.

Translate
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