Changeset 4
- Timestamp:
- 02/18/06 02:58:10 (3 years ago)
- Files:
-
- com/brainoff/worldkitAnnotation.as (modified) (1 diff)
- com/brainoff/worldkitConfig.as (modified) (2 diffs)
- com/brainoff/worldkitImages.as (modified) (2 diffs)
- com/brainoff/worldkitInteraction.as (modified) (6 diffs)
- com/brainoff/worldkitMain.as (modified) (1 diff)
- com/brainoff/worldkitRSS.as (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
com/brainoff/worldkitAnnotation.as
r2 r4 343 343 //REVISIT if icon hasn't loaded yet, it won't load here 344 344 private function loadicon():Void { 345 mc[clipname].createEmptyMovieClip("icon",1); 346 img.loadicon(mc[clipname]["icon"], "icon" + icon); 345 if (mc[clipname]["icon"] == undefined) { 346 mc[clipname].createEmptyMovieClip("icon",1); 347 } 348 if (! img.loadicon(mc[clipname]["icon"], "icon" + icon)) { 349 worldkitUtil.setTimeout(this, "loadicon", 1000); 350 } 347 351 } 348 352 com/brainoff/worldkitConfig.as
r2 r4 251 251 if (subname == undefined) { 252 252 subname = "_default_"; 253 } else { 254 subname = subname.toLowerCase(); 253 255 } 254 256 … … 482 484 break; 483 485 484 485 486 default: 486 487 } com/brainoff/worldkitImages.as
r2 r4 153 153 var key:String = target_mc._parent._name + ":" + target_mc._name; 154 154 target_mc.loaded = true; 155 155 156 156 if (conf.dontstretchimage) { 157 157 target_mc.origwidth = conf.w; … … 524 524 } 525 525 526 public function loadicon(mc:MovieClip, id:String): Void{526 public function loadicon(mc:MovieClip, id:String):Boolean { 527 527 if (imagemc[id].loaded) { 528 mc.loadMovie(imagemc[id].url); 529 mc._x = - .5 * imagemc[id]._width; 530 mc._y = - .5 * imagemc[id]._height; 528 var key:String = imagemc._name + ":" + id; 529 mc.loadMovie(imglist[key].url); 530 mc._x = - .5 * imglist[key]["mc"][id]._width; 531 mc._y = - .5 * imglist[key]["mc"][id]._height; 532 return true; 533 } else { 534 return false; 531 535 } 532 536 } com/brainoff/worldkitInteraction.as
r2 r4 23 23 private var acceptInput:Boolean; 24 24 private var keylistener:Object; 25 private var timenavplay:Boolean; 26 25 27 26 28 var centery:Number; … … 42 44 var maxtime:Date; 43 45 46 44 47 static private var grabberdepth:Number = 20; 45 48 static private var zoomboxdepth:Number = 19; … … 213 216 } else if (String.fromCharCode(Key.getAscii()) == "v") { 214 217 LoadingDialog("worldkit ver. " + worldkitMain.version, true); 218 } else if (String.fromCharCode(Key.getAscii()) == "p") { 219 timenavplay = true; 220 } else if (String.fromCharCode(Key.getAscii()) == "s") { 221 timenavplay = false; 222 } else if (String.fromCharCode(Key.getAscii()) == "r") { 223 timenavplay = false; 224 mc.timenav.scrollbar.setScrollPosition(0); 215 225 } 216 226 } … … 379 389 } 380 390 } 391 392 if (timenavplay) { 393 var p = mc.timenav.scrollbar.getScrollPosition() + 1; 394 if (p <= conf.timenavunit) { 395 mc.timenav.scrollbar.setScrollPosition(p); 396 } else { 397 timenavplay = false; 398 } 399 } 381 400 } 382 401 … … 506 525 public function annotate(x:Number,y:Number):Void { 507 526 var w, h, xoffset=0, yoffset=0; 508 if (ratio > 1) { 509 w = 100 * ratio; h = 100; 510 xoffset = (w - h) / 2; 511 } else { 512 h = 100 / ratio; w = 100; 513 yoffset = (h - w) / 2; 527 if (conf.displaytype == "zoomify") { 528 w = conf.w; 529 h = conf.h; 530 } else { 531 if (ratio > 1) { 532 w = 100 * ratio; h = 100; 533 xoffset = (w - h) / 2; 534 } else { 535 h = 100 / ratio; w = 100; 536 yoffset = (h - w) / 2; 537 } 514 538 } 515 539 var lon = ((x + xoffset)/w) * (ceast - cwest) + cwest; 516 540 var lat = cnorth - ((y + yoffset)/h) * (cnorth - csouth); 541 517 542 518 543 var args = "lat=" + lat + "&long=" + lon + "&zoom=" + scale + "&extent=" + cwest + "," + csouth + "," + ceast + "," + cnorth; … … 646 671 mc.worldkitLoadingDialog.text.borderColor= 0x000000; 647 672 componentScaleAndPosition("worldkitLoadingDialog",100,-1); 648 mc.worldkitLoadingDialog.text.auto size = "center";673 mc.worldkitLoadingDialog.text.autoSize = "center"; 649 674 } 650 675 if (msg == undefined) { 651 676 mc.worldkitLoadingDialog._visible = 0; 652 677 } else { 653 var textsize ;678 var textsize:Number; 654 679 if (size == undefined) { textsize = 20; } else { textsize = size; } 655 mc.worldkitLoadingDialog.text.htmlText = "<font face=\"Arial\" size=\"" + textsize + "\"><b>" + msg + "</b></font>";680 mc.worldkitLoadingDialog.text.htmlText = "<font face=\"Arial\" size=\"" + textsize.toString() + "\"><b>" + msg + "</b></font>"; 656 681 mc.worldkitLoadingDialog._visible = 1; 657 682 } com/brainoff/worldkitMain.as
r1 r4 7 7 8 8 class com.brainoff.worldkitMain { 9 static var version:String = "3.0 ";9 static var version:String = "3.0b-17022006"; 10 10 11 11 var conf:worldkitConfig; com/brainoff/worldkitRSS.as
r2 r4 132 132 } 133 133 134 private function parseRss(node:XMLNode):Void {134 private function parseRss(node:XMLNode):Void { 135 135 136 136 for (var j = 0; j < node.childNodes.length; j++) { … … 301 301 lon = a[b].substr( a[b].indexOf("geo:lon=") + 8); 302 302 } else { 303 sub.push(a[b] );303 sub.push(a[b].toLowerCase()); 304 304 } 305 305 } else { 306 sub.push(a[b] );306 sub.push(a[b].toLowerCase()); 307 307 } 308 308 } … … 493 493 } 494 494 public function onJSubComm(subj:String):Void { 495 subj = subj.toLowerCase(); 495 496 for (var p in Points) { 496 497 var point = Points[p];
