flash on 2013-1-30

by ohisama
make swf test
♥0 | Line 36 | Modified 2013-01-30 12:41:19 | MIT License
play

ActionScript3 source code

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

//make swf test
package
{
    import flash.display.Sprite;
    import flash.display.Loader;
    import flash.utils.ByteArray;
    public class makeswf extends Sprite
    {
        public function makeswf()
        {
            var i : int;
            var ba : ByteArray = new ByteArray();
            for (i = 0; i < DummyData.length; i++)
            {
                ba.writeByte(DummyData[i]);
            }
            var loader : Loader = new Loader();
            loader.x = 20;
            loader.loadBytes(ba);
            addChild(loader);
        }
        private const DummyData : Array =
        [
            0x46, 0x57, 0x53, 0x04, 0xB0, 0x00, 0x00, 0x00, 0x68, 0x00, 0x10, 0x40, 0x00, 0x04, 0x10, 0x00, 
            0x00, 0x0C, 0x01, 0x00, 0x43, 0x02, 0x33, 0x33, 0x33, 0x3F, 0x03, 0x79, 0x00, 0x00, 0x00, 0x00, 
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x09, 0x01, 0x00, 0x60, 0x0A, 0x3F, 0xC0, 
            0x0A, 0x3F, 0xC0, 0x60, 0x08, 0x78, 0x00, 0x05, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00
        ];
    }
}

Forked