Link to home
Start Free TrialLog in
Avatar of kmead6
kmead6Flag for United States of America

asked on

Nice "zoom" using Actionscript 2.0?

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
Avatar of crooksy88
crooksy88
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of kmead6

ASKER

thanks so much (again). this is really nice, i'll see what i can do
Avatar of kmead6

ASKER

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! =)
ASKER CERTIFIED SOLUTION
Avatar of crooksy88
crooksy88
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kmead6

ASKER

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...
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
Avatar of kmead6

ASKER

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!