flash on 2012-4-17

by painteroflight
♥0 | Line 20 | Modified 2012-04-17 14:22:21 | MIT License
play

ActionScript3 source code

/**
 * Copyright painteroflight ( http://wonderfl.net/user/painteroflight )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/1iq4
 */

package {
    import flash.text.TextField;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            
            var s1:Sprite = new Sprite();
            s1.name = "a";
            addChild(s1);
            
            var s2:Sprite = new Sprite();
            s2.name = "a";
            addChild(s2);
            
            var t:TextField = new TextField();
            
            addChild(t);
            
            t.text = (this.getChildByName("a") == s1).toString() + ", ";
            t.appendText((this.getChildByName("a") == s2).toString() + ", ");
            t.appendText(this.getChildIndex(s1).toString() + ", ");
            t.appendText(this.getChildIndex(s2).toString());
            
            
        }
    }
}