 package{
 	import flash.display.Sprite;
+	import flash.net.registerClassAlias;
 	import flash.text.TextField;
 	import flash.utils.ByteArray;
 

			tf.wordWrap = true;
			addChild(tf);

			var b:ByteArray = new ByteArray();
			var v:Vector.<int> = new Vector.<int>();
			for(var z:int = 0; z < 3; ++z)
				v.push(z);
			b.writeObject(v);

			dumpByteArray(b);

			var data:Array = [
				0x0d, 0x07, 0x00,
				0x00, 0x00, 0x00, 0x01,
				0x00, 0x00, 0x00, 0x02,
				0x00, 0x00, 0x00, 0x03
			];
			b = createByteArray(data);

			var o:* = b.readObject();
			tf.appendText(o + "\n");

			} else {
				tf.appendText("Vector is null\n");
			}
		}

		private function testExternalizable():void {
			tf.text = "";
			registerClassAlias("Foo", Foo);
			var b:ByteArray = new ByteArray();
			var f:Foo = new Foo("asd");
			var g:Foo = new Foo("bar");
			var a:Array = [f, f, g];
			b.writeObject(a);
			dumpByteArray(b);
			b.position = 0;
			var a2:Array = b.readObject();
			tf.appendText((a[0] as Foo).foo);
			tf.appendText((a[1] as Foo).foo);
			tf.appendText((a[2] as Foo).foo);
		}

		private function dumpByteArray(b:ByteArray):void {
