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
Solved

Actionscript for Zooming in Background when Mouse Rolls Over

Posted on 2009-07-10
3
372 Views
Last Modified: 2013-11-11
Hi, I have a basic working knowledge of Actionscript and Flash and have what I hope is a simple question. I need to make an interactive map that when you rollover a button a little bubble pops up with info, like google maps. I know how to do all of that, but what I want is to have the map, which is not the button that triggers the roll over event of the bubble popping up, to scale bigger like it's zooming in when the user hovers over the pinpoint button.

Any ideas?
0
Comment
Question by:kmead6
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
TanLiHao earned 500 total points
ID: 24829870
If your map is a movieclip or button you can add a mouseover event to it. On mouseover you just set the width and height of the movieclip larger. Please specify what exactly you want to do and whether it's in AS2 or AS3.

I will give a sample for each.

If it's AS2 you just instanceName.onRollOver = function() {
map._xscale *= 1.5;
map._yscale *= 1.5;
}
map.useHandCursor = false; // if you do not want a cursor

if it's AS3 you do

map.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
function mouseOverHandler(event:Event):void {
map.scaleX *= 1.5;
map.scaleY *= 1.5;
}

0
 
LVL 6

Author Comment

by:kmead6
ID: 24831562
Hmm, I'll give that a shot. My map is in AS2. I don't want the map to zoom in when the mouse is over it unless the mouse is over a certain pinpoint though and I think what you're suggesting might make the map zoom no matter where the mouse is. Can I add a button to the map that is underneath the button of the pinpoint so they sync up? Also, if I want the map to zoom out when off the pinpoint should I just add a rollout function?

Thanks for your help!
0
 
LVL 14

Expert Comment

by:TanLiHao
ID: 24833127
Create a button with the up,over,down frames empty. The hit frame you put the shape of the button that when you rollover the button it will zoom the map. So you just place the button over the map where you want the pinpoint to be.

If you want to zoom out, just like you said, just add a rollout function.
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

861 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