Changeset 8
- Timestamp:
- 03/25/06 03:34:08 (3 years ago)
- Files:
-
- worldkit/com/brainoff/worldkitAnnotation.as (modified) (4 diffs)
- worldkit/com/brainoff/worldkitConfig.as (modified) (1 diff)
- worldkit/com/brainoff/worldkitImages.as (modified) (2 diffs)
- worldkit/com/brainoff/worldkitInteraction.as (modified) (5 diffs)
- worldkit/com/brainoff/worldkitMain.as (modified) (1 diff)
- worldkit/com/brainoff/worldkitRSS.as (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
worldkit/com/brainoff/worldkitAnnotation.as
r7 r8 307 307 var x = 0; var y = 0; //movie clip is already positioned 308 308 var s = plotsize; 309 mc[clipname].lineStyle( 0, 0x000000, 100);309 mc[clipname].lineStyle( linethickness, linecolor, linealpha ); 310 310 mc[clipname].moveTo(x-s,y-s); 311 mc[clipname].beginFill( color );311 mc[clipname].beginFill( color, fillalpha ); 312 312 mc[clipname].lineTo(x-s,y+s); 313 313 mc[clipname].lineTo(x+s,y+s); … … 320 320 var x = 0; var y = 0; //movie clip is already positioned 321 321 var s = plotsize; 322 mc[clipname].lineStyle( 1, linecolor, linealpha );322 mc[clipname].lineStyle( linethickness, linecolor, linealpha ); 323 323 mc[clipname].moveTo(x+s,y); //move to point on the circle to drawArc 324 mc[clipname].beginFill( color, 100);324 mc[clipname].beginFill( color, fillalpha ); 325 325 mc[clipname].drawArc(x+s,y,s,360,0); 326 326 mc[clipname].endFill(); … … 330 330 var x = 0; var y = 0; //movie clip is already positioned 331 331 var s = plotsize; 332 mc[clipname].lineStyle( 1, 0x000000, 100);332 mc[clipname].lineStyle( linethickness, linecolor, linealpha ); 333 333 mc[clipname].moveTo(x /*Math.cos(Math.PI / 2)*/, 334 334 y - s /*Math.sin(Math.PI / 2)*/); … … 512 512 } 513 513 } 514 515 public function GetItem():Void { 516 var s = "||"; 517 var catstring = cats.join(","); 518 var coords; 519 if (vtype == "poly" || vtype == "line") { 520 coords = vector; 521 } else { 522 coords = String(lat) + "," + String(lon); 523 } 524 var args = title + s + url + s + summary + s + catstring + s + coords + s + vtype; 525 interact.annotate(null,null,args); 526 } 514 527 } worldkit/com/brainoff/worldkitConfig.as
r7 r8 167 167 168 168 activatecolor = new worldkitConfigCat(0xFF0000); 169 fillalpha = new worldkitConfigCat( 30);169 fillalpha = new worldkitConfigCat(100); 170 170 icon = new worldkitConfigCat(""); 171 171 initialplotcolor = new worldkitConfigCat(0xFF0000); worldkit/com/brainoff/worldkitImages.as
r7 r8 120 120 121 121 mc.createEmptyMovieClip(id, level); 122 mc[ id ]._alpha = 0; 122 if (bg == 1) { 123 mc[ id ]._alpha = 0; 124 } 123 125 124 126 var image_mcl:MovieClipLoader = new MovieClipLoader(); … … 185 187 } 186 188 187 if (! imglist[key].bg) {188 target_mc._alpha = 100;189 }189 //if (! imglist[key].bg) { 190 // target_mc._alpha = 100; 191 //} 190 192 191 193 imagesLoading--; worldkit/com/brainoff/worldkitInteraction.as
r7 r8 523 523 524 524 */ 525 public function annotate(x:Number,y:Number):Void { 526 var w, h, xoffset=0, yoffset=0; 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 } 538 } 539 var lon = ((x + xoffset)/w) * (ceast - cwest) + cwest; 540 var lat = cnorth - ((y + yoffset)/h) * (cnorth - csouth); 541 542 543 var args = "lat=" + lat + "&long=" + lon + "&zoom=" + scale + "&extent=" + cwest + "," + csouth + "," + ceast + "," + cnorth; 544 525 public function annotate(x:Number,y:Number,args:String):Void { 526 if (args == undefined) { 527 var w, h, xoffset=0, yoffset=0; 528 if (conf.displaytype == "zoomify") { 529 w = conf.w; 530 h = conf.h; 531 } else { 532 if (ratio > 1) { 533 w = 100 * ratio; h = 100; 534 xoffset = (w - h) / 2; 535 } else { 536 h = 100 / ratio; w = 100; 537 yoffset = (h - w) / 2; 538 } 539 } 540 var lon = ((x + xoffset)/w) * (ceast - cwest) + cwest; 541 var lat = cnorth - ((y + yoffset)/h) * (cnorth - csouth); 542 543 args = "lat=" + lat + "&long=" + lon + "&zoom=" + scale + "&extent=" + cwest + "," + csouth + "," + ceast + "," + cnorth; 544 } 545 545 546 if (conf.annotateurl.indexOf("javascript") == 0) { 546 547 if (conf.fscommand == true) { … … 555 556 556 557 } 557 558 558 559 public function SetupJavascript():Void { 559 560 _root.JComm = ""; … … 566 567 _root.JAnnoComm = ""; 567 568 _root.JHackComm = ""; 569 _root.JInputComm = ""; 570 _root.JGetItemComm = ""; 568 571 _root.watch("JComm",worldkitInteraction.onJavascript,this); 569 572 _root.watch("JSubComm", worldkitInteraction.onJavascript,this); … … 575 578 _root.watch("JAnnoComm", worldkitInteraction.onJavascript,this); 576 579 _root.watch("JHackComm", worldkitInteraction.onJavascript,this); 580 _root.watch("JInputComm", worldkitInteraction.onJavascript,this); 581 _root.watch("JGetItemComm", worldkitInteraction.onJavascript,this); 577 582 } 578 583 … … 637 642 annotate(geo[0], geo[1]); 638 643 } 639 644 public function onJInputComm(newVal) { 645 var val = false; 646 if (newVal == "true") { 647 val = true; 648 } 649 conf.inputonly = val; 650 acceptInput = val; 651 } 652 public function onJGetItemComm(newVal) { 653 rss.onJGetItemComm(newVal); 654 } 640 655 public function SetupTimenav():Void { 641 656 mc.createEmptyMovieClip("timenav",timenavdepth); worldkit/com/brainoff/worldkitMain.as
r7 r8 7 7 8 8 class com.brainoff.worldkitMain { 9 static var version:String = "3.0 b-07032006-3";9 static var version:String = "3.0"; 10 10 11 11 var conf:worldkitConfig; worldkit/com/brainoff/worldkitRSS.as
r7 r8 538 538 loader.onLoad(true); 539 539 } 540 public function onJGetItemComm(id:String):Void { 541 if (Points[ id ] != undefined) { 542 Points[id].GetItem(); 543 } 544 } 545 540 546 }
