?
Solved

Actionscript for Zooming in Background when Mouse Rolls Over

Posted on 2009-07-10
3
Medium Priority
?
375 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
[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
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
TanLiHao earned 2000 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

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

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

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…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
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.
Suggested Courses

764 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