Advertisement
Hydro9268

2003 Flash Map Source code - Map code

Jun 4th, 2019
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Frame 1 */
  2.  
  3. //_level0.dataLoaded = false;
  4. var urlValues = _root.strKey;
  5. var chrMarker = "";
  6. var mapName = "";
  7.  
  8. var CiIndex = urlValues.indexOf("Ci=",0);
  9. var urlSubString = urlValues.substring(CiIndex+3,urlValues.length);
  10.  
  11. for (i=0; i<=urlSubString.length; i++) {
  12.     chrMarker = urlSubString.substr(i,1);
  13.     if (chrMarker == "&") {
  14.         break;
  15.     } else if (chrMarker == "+") {
  16.         mapName += "_";
  17.     } else {
  18.         mapName += chrMarker;
  19.     }
  20. }
  21.  
  22. mapName = "maps/cities/" + mapName.toLowerCase() + ".swf";
  23. loadMovie(mapName, _root.mapLoad);
  24. domVar = new LoadVars();
  25. domVar.load("domain.txt");
  26. domVar.onLoad = function(success) {
  27.     dom = domVar.domain+"mlsdata.asp?"+urlValues;
  28.     gotoAndPlay(2);
  29. }
  30.  
  31. /* Frame 3 */
  32.  
  33. #include "inc/mapdotdup.as"
  34.  
  35. // inc/mapdotdup.as
  36. loadMovie("maps/cities/console.swf", 2);
  37. loadedVars = new LoadVars();
  38. loadedVars.load(dom);
  39. loadedVars.onLoad = parseMe;
  40.  
  41. function parseMe() {
  42.     for(i=-1; i < this.total; i++) {
  43.         _root.dot.duplicateMovieClip("dot_"+i, i);
  44.         _root["dot_"+i]._x = this["x"+i];h
  45.         _root["dot_"+i]._y = this["y"+i];
  46.         if (this["p"+i] >= int(600000)) {
  47.             dotColor = new Color(_root["dot_"+i]);
  48.             dotColor.setRGB(0x00FF00); // bright green
  49.         } else if (this["p"+i] <= int(599999) && this["p"+i] >= int(500000)) {
  50.             dotColor = new Color(_root["dot_"+i]);
  51.             dotColor.setRGB(0x00CC33); // shade green
  52.         } else if (this["p"+i] <= int(499999) && this["p"+i] >= int(400000)) {
  53.             dotColor = new Color(_root["dot_"+i]);
  54.             dotColor.setRGB(0x009966); // mid-green
  55.         } else if (this["p"+i] <= int(399999) && this["p"+i] >= int(300000)) {
  56.             dotColor = new Color(_root["dot_"+i]);
  57.             dotColor.setRGB(0x006699); // mid-blue
  58.         } else if (this["p"+i] <= int(299999) && this["p"+i] >= int(200000)) {
  59.             dotColor = new Color(_root["dot_"+i]);
  60.             dotColor.setRGB(0x0033CC); // shade blue
  61.         } else {
  62.             dotColor = new Color(_root["dot_"+i]);
  63.             dotColor.setRGB(0x0000FF); // bright blue
  64.         }
  65.     }
  66.     recordCnt = parseInt(_level0.loadedVars["total"]) + 1;
  67.     _level0.attachMovie("TLaddressBubble", "TL", recordCnt+1);
  68.     _level0.attachMovie("BLaddressBubble", "BL", recordCnt+2);
  69.     _level0.attachMovie("TRaddressBubble", "TR", recordCnt+3);
  70.     _level0.attachMovie("BRaddressBubble", "BR", recordCnt+4);
  71.     _level0.TL._x = -450;
  72.     _level0.BL._x = -450;
  73.     _level0.TR._x = -450;
  74.     _level0.BR._x = -450;
  75.     _level0.dot._visible = 0;
  76.  
  77.     if (_root.loadedVars.markerx) {
  78.         _level0.dot.duplicateMovieClip("markerDot", this.total+1);
  79.         markerColor = new Color(_root.markerDot);
  80.         markerColor.setRGB(0x000000);
  81.         _level0.markerDot._visible = 100;
  82.         _level0.markerDot._x = _level0.loadedVars.markerx;
  83.         _level0.markerDot._y = _level0.loadedVars.markery;
  84.     }
  85. }
  86.  
  87. /* Frame 4 */
  88.  
  89. play();
  90.  
  91. /* Frame 5 */
  92.  
  93. if (_root.loadedVars.isLoaded != 1) {
  94.     this.gotoAndPlay(this._currentframe -1);
  95. }
  96.  
  97. /* Frame 7 */
  98.  
  99. removeMovieClip(_root.dot);
  100. stop();
  101.  
  102. /* Property info for each dot */
  103.  
  104. mls = _level0.loadedVars["m" + this._name.substring(4)];
  105. pInt = _level0.loadedVars["p" + this._name.substring(4)];
  106. price = _root.formatCurrency.FormatAsDollars(pInt);
  107. address = _level0.loadedVars["a" + this._name.substring(4)] + newline;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement