Solved

Nice "zoom" using Actionscript 2.0?

Posted on 2009-07-15
7
1,541 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

623 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