Flash world map...

Discussion in 'Web Design and Development' started by moneyshot, Aug 6, 2008.

  1. moneyshot macrumors member

    Joined:
    Nov 23, 2006
    #1
    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. :)
     
  2. snickelfritz macrumors 65816

    snickelfritz

    Joined:
    Oct 24, 2003
    Location:
    Tucson AZ
    #2
    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

    Here's the AS3 code, using TweenMax for the tweening, and keyframes for the rollovers.
    Source FLA is attached.
    Code:
    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;
    	}
    }
     

    Attached Files:

  3. ChicoWeb macrumors 65816

    ChicoWeb

    Joined:
    Aug 16, 2004
    Location:
    California
    #3
    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/
     
  4. Mitou macrumors regular

    Joined:
    Jan 25, 2008
    #5
    If you want to purchase (inexpensively) a flash already created like that flashden.net has a couple of nice files.
     
  5. moneyshot thread starter macrumors member

    Joined:
    Nov 23, 2006
    #7
    Thanks everyone!

    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. :)
     

Share This Page