+ writer.write_string("script", script);
+ switch (dir)
+ {
+ case DOWN:
+ writer.write_string("direction", "down"); break;
+ case LEFT:
+ writer.write_string("direction", "left"); break;
+ case RIGHT:
+ writer.write_string("direction", "right"); break;
+ default: break;
+ }