Jump to content
Search Community

teddy

Members
  • Posts

    5
  • Joined

  • Last visited

teddy's Achievements

0

Reputation

  1. take a look at this page:http://www.myethiopia.org/QuickLinks/AnimSat.html is it possible to do this in flash and if so, does anyone have an example?
  2. teddy

    error problem

    Carl, I love you man. I can't tell you how much work you saved me. Basically I was in the process of drawing over 600 counties,states, cities and int'l border. Now thanks to the shpfeature.as and your excellent tutorial and greensock, only 4 lines of code is all that is needed. Thank you very much. this works below..... function mapOver(e:MouseEvent):void{ TweenMax.to(e.target, .5, {tint:0xFF9900}); } function mapOut(e:MouseEvent):void{ TweenMax.to(e.target, .5, {removeTint:true}); }
  3. teddy

    error problem

    carl, var mapItem:MovieClip = e.target did not work and mapItem is a sprite. I can't figure out how I would use a sprite in this case to have the same outcome as snorkl's youtube example????? thanks.
  4. teddy

    error problem

    You are right it is false. What I want to do is: I want to show the name of the states when I mouseover the shapefile. Isn't movie clip the only way to do it? I am following the snorkl exampe via thanks.
  5. Hi, I keep getting this message and can not figure out why. The greensock folder is in the com directory and there is no issue there. Here is the error msg: ----------------------------------------------------------------- Error: Cannot tween a null object. at com.greensock::TweenLite()[C] at com.greensock::TweenMax()[C] at com.greensock::TweenMax$/to()[C] at ShapefileExample/mapOver()[C] TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.greensock::TweenLite/init()[C] at com.greensock::TweenMax/init()[C] at com.greensock::TweenMax/renderTime()[C] at com.greensock.core::SimpleTimeline/renderTime()[C] at com.greensock::TweenLite$/updateAll()[C] --------------------------------------------------------------------------------- Here is my code: package { import com.greensock.*; import com.cartogrammar.shp.ShpMap; import com.cartogrammar.shp.ShpFeature; import flash.events.Event; import flash.display.Sprite; import flash.display.MovieClip; import flash.events.MouseEvent; import flash.geom.ColorTransform; [sWF(width='800', height='800', backgroundColor='#ffffff', frameRate='30')] /** * An example of drawing a simple map from a shapefile using my ShpMap class and Edwin van Rijkom's library. * * @author Andy Woodruff (cartogrammar.com/blog) * */ public class ShapefileExample extends Sprite { private var map : ShpMap; public function ShapefileExample() { map = new ShpMap("data/Zones.shp","data/Zones.dbf");//Original map.buttonMode=true; map.addEventListener(MouseEvent.MOUSE_OVER, mapOver); map.addEventListener(MouseEvent.MOUSE_OUT, mapOut); //addChild(road); addChild(map); map.addEventListener("map loaded",onMapLoaded); } // Need to wait for the map to finish loading/drawing before it can be resized correctly. private function onMapLoaded(event:Event):void { map.scaleX = map.scaleY = map.width > map.height ? stage.stageWidth/map.width : stage.stageHeight/map.height; // just for fun, add a marker to somewhere around my house! //addMarkerAt( 9,38 ); } function mapOver(e:MouseEvent):void{ var mapItem:MovieClip = e.target as MovieClip; TweenMax.to(mapItem, .5, {tint:0xFF9900}); } function mapOut(e:MouseEvent):void{ var mapItem:MovieClip = e.target as MovieClip; trace(mapItem); TweenMax.to(mapItem, .5, {removeTint:true}); } }
×
×
  • Create New...