Graphics Programs Reference
In-Depth Information
As before, you need to import the classes that you will use. Usually, you
add these as you need them in the code, but for the sake of simplicity, you
can add all of them at once.
import com.modestmaps.Map;
import com.modestmaps.events.MapEvent;
import flash.display.Sprite;
import flash.events.TimerEvent;
import flash.geom.Point;
import flash.utils.Timer;
The first two are from Modest Maps, whereas the last four are native
classes. Then you set variables right before the MarkersClip() function.
Again, you would add these as you need them, but you can add them all
now to get to the meat of this class—the functions.
protected var map:Map; // Base map
public var markers:Array; // Holder for markers
public var isStationary:Boolean;
public var locations:Array;
private var openingDates:Array;
private var storesPerYear:Array = new Array();
private var spyIndex:Number = 0; // Stores per year index
private var currentYearCount:Number = 0; // Stores shown so far
private var currentRate:Number; // Number of stores to show
private var totalTime:Number = 90000; // Approx. 1.5 minutes
private var timePerYear:Number;
public var currentYear:Number = 1962; // Start with initial year
private var xpoints:Array = new Array(); // Transformed longitude
private var ypoints:Array = new Array(); // Transformed latitude
public var markerIndex:Number = 0;
private var starting:Point;
private var pause:Boolean = false;
public var scaleZoom:Boolean = false;
Search WWH ::




Custom Search