forked from: flash on 2013-1-30

by yurij.shaulov forked from flash on 2013-1-30 (diff: 36)
make swf test
♥0 | Line 60 | Modified 2013-01-31 03:48:34 | MIT License
play

ActionScript3 source code

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

// forked from ohisama's flash on 2013-1-30
//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, 0x06, 0xc3, 0x83,
            0x00, 0x00, 0x00, 0x78, 0x00, 0x05,
             0x5f, 0x00, 0x00, 0x0f, 0xc2, 0xa0,
              0x00, 0x00, 0x0c, 0x01, 0x00, 0x43,
               0x02, 0xc3, 0xbf, 0xc3, 0xbf, 0xc3,
                0xbf, 0x3f, 0x03, 0x40, 0x00, 0x00,
                 0x00, 0xc2, 0x96, 0x07, 0x00, 0x00,
                  0x74, 0x65, 0x78, 0x74, 0x31, 0x00,
                   0x1c, 0xc2, 0x96, 0x30, 0x00, 0x00, 
                   0x74, 0x65, 0x78, 0x74, 0x00, 0x00, 
                   0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 
                   0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 
                   0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 
                   0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 
                   0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 
                   0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
                    0x41, 0x41, 0x00, 0x4f, 0x00, 0x3f, 0x0c,
                     0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04,
                      0x01, 0x10, 0x54, 0x69, 0x6d, 0x65,
                       0x73, 0x20, 0x4e, 0x65, 0x77, 0x20, 
                       0x52, 0x6f, 0x6d, 0x61, 0x6e, 0x00, 
                       0x00, 0x00, 0x02, 0x00, 0x7f, 0x09, 
                       0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 
                       0x77, 0xc3, 0xbb, 0x0e, 0x5f, 0xc3, 
                       0xbf, 0xc2, 0xb0, 0x09, 0xc2, 0xa8, 
                       0xc2, 0x8d, 0x20, 0x01, 0x00, 0xc3, 
                       0xb0, 0x00, 0x00, 0x00, 0x00, 0xc3, 
                       0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 
                       0x00, 0x00, 0x28, 0x00, 0x00, 0x34, 
                       0x35, 0x34, 0x32, 0x32, 0x00, 0xc2, 
                       0xbf, 0x06, 0x10, 0x00, 0x00, 0x00, 
                       0x26, 0x01, 0x00, 0x02, 0x00, 0x1a, 
                       0x61, 0xc2, 0x87, 0x00, 0xc2, 0x80, 
                       0x74, 0x65, 0x78, 0x74, 0x31, 0x00, 
                       0x40, 0x00, 0x00, 0x00
        ];
    }
}