Created
June 29, 2010 19:07
-
-
Save odoe/457630 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.odoe.components { | |
import com.esri.ags.Map; | |
import mx.controls.Image; | |
// New logo looks cool, but position changed | |
// slightly from previous versions and now it's in my way. | |
// Extend the Map object to tweak it a bit | |
public class MyMap extends Map { | |
// variable to hold value to position logo | |
public var logoToBottom:Number = 0; | |
override public function MyMap() { | |
super(); | |
} | |
override protected function createChildren():void { | |
super.createChildren(); | |
if (logoToBottom > 0) { | |
var i:uint = 0; | |
var x:uint = this.staticLayer.numChildren; | |
for (i; i < x; i++) { | |
// logo should be only image object in staticlayer | |
// but this could change in future releases | |
if (this.staticLayer.getChildAt(i) is Image) { | |
// set the bottom property of the image | |
(this.staticLayer.getChildAt(i) as Image).bottom = logoToBottom; | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment