View Full Version : Flash world map...
moneyshot
Aug 6, 2008, 12:55 PM
Hi,
Im wanting a flash world map for a website. Just something basic with a hover function over countries.
The lonely planet site has exactly what I would like: http://www.lonelyplanet.com/worldguide/
Does anyone know where I could get one, preferably free or would it be hard to design one?
Thanks in Advance. :)
snickelfritz
Aug 6, 2008, 03:16 PM
I recently created an AS3 solution for similar question on the Kirupa forum.
Here's a basic demo that can be easily applied to map graphics.
The graphics should be fairly simple to create using a layered Illustrator file, and an image of the Earth as a template.
http://www.byrographics.com/AS3/stateCapitol/states_capitols.swf (http://www.byrographics.com/AS3/stateCapitol/states_capitols.swf)
Here's the AS3 code, using TweenMax (http://blog.greensock.com/tweenmaxas3/) for the tweening, and keyframes for the rollovers.
Source FLA is attached.
stop();
import gs.TweenMax;
import fl.motion.easing.*;
stage.scaleMode = StageScaleMode.NO_SCALE;
var stateName:String = "";
stateGroup.buttonMode = true;
stateGroup.mouseEnabled = true;
stateGroup.addEventListener(MouseEvent.MOUSE_OVER , rollover, false, 0, true);
stateGroup.addEventListener(MouseEvent.MOUSE_OUT, rollout, false, 0, true);
function rollout(event:MouseEvent):void {
TweenMax.to(event.target, .5, {scaleX:1, scaleY:1, dropShadowFilter:{color:0x000000, alpha:0, blurX:0, blurY:0, strength:1, angle:45, distance:0}});
stateTxt.text = "";
capitolTxt.text = "";
gotoAndStop(1);
}
function rollover(event:MouseEvent):void {
stateName = event.target.name;
gotoAndStop(stateName);
trace(stateName);
TweenMax.to(event.target, .5, {scaleX:1.02, scaleY:1.02, dropShadowFilter:{color:0x000000, alpha:0.5, blurX:5, blurY:5, strength:1, angle:45, distance:5}});
switch (stateName) {
case "Arizona" :
stateTxt.text = stateName;
capitolTxt.text = "Phoenix";
break;
case "Colorado" :
stateTxt.text = stateName;
capitolTxt.text = "Denver";
break;
case "California" :
stateTxt.text = stateName;
capitolTxt.text = "Sacramento";
break;
case "Utah" :
stateTxt.text = stateName;
capitolTxt.text = "Salt Lake City";
break;
case "Wyoming" :
stateTxt.text = stateName;
capitolTxt.text = "Cheyenne";
break;
}
}
ChicoWeb
Aug 6, 2008, 11:10 PM
Not sure what your use for it is, but we ran into the same issue a few weeks back. We decided to use JS and HTML, you can see below, but we looked at swf.
http://lbd.chicodev.com/advisor/
carbon14
Aug 6, 2008, 11:38 PM
iStockphoto has something like this:
http://www.istockphoto.com/file_closeup/concepts-and-ideas/848858-world-navigation-menu.php?id=848858
Mitou
Aug 6, 2008, 11:55 PM
If you want to purchase (inexpensively) a flash already created like that flashden.net has a couple of nice files.
snickelfritz
Aug 7, 2008, 03:05 AM
http://www.byrographics.com/AS3/imageZoom/imageZoom1.html
moneyshot
Aug 8, 2008, 11:27 AM
Thanks for all the suggestions...
Found a nice one on flash den ;-)
ChicoWeb: The map is needed for a travel site. Would that map you have be difficult to adapt to a simple world map?
Thanks again everyone. :)
vBulletin® v3.6.10, Copyright ©2000-2009, Jelsoft Enterprises Ltd.