Solved

Nice "zoom" using Actionscript 2.0?

Posted on 2009-07-15
7
1,528 Views
Last Modified: 2013-11-11
I've made an interactive map of CA and when you roll over certain counties they glow and a text bubble pops up with facts. A lot of these buttons that are attached to the roll over events are by the bay area so I wanted to make a nice zoom anytime you rolled over that area of CA. I tried adding a separate invisible button over that general area but I lost the text bubble and glow of the buttons below it. I tried making motion tweens for all the layers that are buttons with an scaling animation but then the text bubble didn't follow the new locations of the scaled counties. Can anyone help me tackle this problem?

I'm attaching the .fla. I'm trying to zoom in the area of central ca - the bay area (where the 8 buttons are) and would like to go back to the original size when you rollout (like zoom back out)

thanks in advance!
zoom.fla.txt
0
Comment
Question by:kmead6
  • 4
  • 3
7 Comments
 
LVL 13

Expert Comment

by:crooksy88
ID: 24867028
Doing this using rollovers isn't the most user friendly solution as users are already using rollovers to activate areas.

The attached example shows you an option where a zoom in/zoom out button is used.

In order to zoom the map as a unit and not zoom the markers I've separated the map from the markers and placed all the map layers into a new movieclip.

You'll have to do some work on the location of your marker panels and also you need to move them off screen onRollOut so users can see the full map but hopefully this will get you started in the right direction.
zoom2.txt
0
 
LVL 6

Author Comment

by:kmead6
ID: 24871489
thanks so much (again). this is really nice, i'll see what i can do
0
 
LVL 6

Author Comment

by:kmead6
ID: 24887913
i hate to be such a noob but i can't seem to figure out how to get the marker panels to hit the map anymore. it's still following the command of the marker appearing when you click on the county (i changed it from rollover) but it appears offscreen. I have the x,y coordinates of where it should hit everytime vs. where it actually hits but i'm not sure how to use that to get it in line. any help would be great! =)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 13

Accepted Solution

by:
crooksy88 earned 500 total points
ID: 24888653
The issue is to do with the x and y position of the map within the map movieclip. The buttons are taking there coordinates from this and not the documents x and y 0.

The attached file sorts that out and I've also removed the point from the marker graphic which allows you not to be so precise with the positioning.

There is also a new function to remove the marker on rollout
zoom3.txt
0
 
LVL 6

Author Comment

by:kmead6
ID: 24888817
this works perfectly! thank you for taking the time to help someone out who's just starting!

just one (not really important) question though: i tried to add a magnifying glass icon next to the "zoom in/out" text (on the same layer/combined with the button/on its own layer) and when i do it causes the county names to become missing or misspelled in the movie clip bubble. so strange! any clue why? maybe just a glitch...
0
 
LVL 13

Expert Comment

by:crooksy88
ID: 24889165
Although what you are doing should affect the text fields at all you could try adding the icon to the zoom in and zoom out buttons (see attached).

Make sure the text fields are using a font that you have installed on your computer and that you have embedded the necessary glyphs for those dynamic text fields.


zoom4.txt
0
 
LVL 6

Author Comment

by:kmead6
ID: 24890438
huh...actually the issues start when i change the text to be "Arial" instead of "( Arial Bold )" which is a substituted font. so weird. i found a work around though, no worries! thanks for all your help!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question