Changeset 639
- Timestamp:
- 08/14/08 12:19:57 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/tom-tweenlite/lib/com/modestmaps/core/TileGrid.as
r635 r639 12 12 import flash.events.IOErrorEvent; 13 13 import flash.events.MouseEvent; 14 import flash.events.ProgressEvent; 14 15 import flash.geom.Matrix; 15 16 import flash.geom.Point; … … 220 221 221 222 well = new Sprite(); 223 well.name = 'well'; 222 224 well.doubleClickEnabled = true; 223 225 well.mouseEnabled = true; … … 228 230 229 231 addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); 232 } 233 234 /** 235 * Get the Tile instance that corresponds to a given coordinate. 236 */ 237 public function getCoordTile(coord:Coordinate):Tile 238 { 239 // these get floored when they're cast as ints in tileKey() 240 var key:String = tileKey(coord.column, coord.row, coord.zoom); 241 return well.getChildByName(key) as Tile; 230 242 } 231 243 … … 689 701 dispatchEvent(new MapEvent(MapEvent.BEGIN_TILE_LOADING)); 690 702 } 691 else if (previousOpenRequests > 0 && openRequests.length == 0) { 692 dispatchEvent(new MapEvent(MapEvent.ALL_TILES_LOADED)); 693 // request redraw to take parent and child tiles off the stage if we haven't already 694 dirty = true; 703 else if (previousOpenRequests > 0) 704 { 705 // dispatch tile load progress 706 dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, previousOpenRequests - openRequests.length, previousOpenRequests)); 707 708 // if we're finished... 709 if (openRequests.length == 0) 710 { 711 dispatchEvent(new MapEvent(MapEvent.ALL_TILES_LOADED)); 712 // request redraw to take parent and child tiles off the stage if we haven't already 713 dirty = true; 714 } 695 715 } 696 716
