flash on 2017-2-28

by shaktool
♥0 | Line 30 | Modified 2017-02-28 17:38:26 | MIT License
play

ActionScript3 source code

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

package {
    import flash.display.Sprite;
    import flash.utils.ByteArray;
    import flash.text.*;
    
    public class FlashTest extends Sprite {
        private var myTextBox: TextField = new TextField();
        
        public function FlashTest() {
            // write as3 code here..
            var x: int = int({a: 2});
            
            var y: * = {a: 1}["b"];
            
            if (y === undefined) {
                myTextBox.text = "u";
            } else {
                myTextBox.text = "?";
            }



            var bytes: ByteArray = new ByteArray();
            bytes.writeByte(3);
            bytes.writeByte(4);
            bytes.writeByte(5);
            bytes.writeByte(6);
            bytes.position = 1;
            bytes.writeByte(7);
            bytes.writeByte(7);
            bytes.writeByte(7);
            bytes.writeByte(7);
            
            bytes.position = 3;
            myTextBox.text = "" + bytes.length;
            addChild(myTextBox);
        }
    }
}