This is part of work intended to reposition P2 as an intermediate editor for a comparatively small number of OSMers (read: "the editor I want to use") now that we have iD for beginners and other new users
/** Tile image has been downloaded, so start displaying it. */
protected function doImgInit(event:Event):void {
- event.target.loader.alpha=0;
- var t:Timer=new Timer(10,10);
- t.addEventListener(TimerEvent.TIMER,function():void { upFade(DisplayObject(event.target.loader)); });
- t.start();
waiting--;
loadcount++;
if (loadcount>MAXTILESLOADED) purgeTiles();
return;
}
- protected function upFade(s:DisplayObject):void {
- s.alpha+=0.1;
- }
-
protected function purgeTiles():void {
for (var tile:String in tiles) {
if (tiles[tile] is Sprite) {