Solved

Nice "zoom" using Actionscript 2.0?

Posted on 2009-07-15
7
1,518 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
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.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now