Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Actionscript for Zooming in Background when Mouse Rolls Over

Posted on 2009-07-10
3
Medium Priority
?
380 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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.
Suggested Courses

604 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