[Swfdec] 6 commits - libswfdec/Makefile.am libswfdec/swfdec_character.c libswfdec/swfdec_external_interface.c libswfdec/swfdec.h libswfdec/swfdec_movie_as_drawing.c libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h libswfdec/swfdec_player_scripting.c libswfdec/swfdec_player_scripting.h libswfdec/swfdec_text_field_movie_html.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml.h test/trace
Benjamin Otte
company at kemper.freedesktop.org
Sun Dec 23 05:00:14 PST 2007
libswfdec/Makefile.am | 2
libswfdec/swfdec.h | 1
libswfdec/swfdec_character.c | 1
libswfdec/swfdec_external_interface.c | 94 +
libswfdec/swfdec_movie_as_drawing.c | 12
libswfdec/swfdec_player.c | 53
libswfdec/swfdec_player.h | 7
libswfdec/swfdec_player_internal.h | 2
libswfdec/swfdec_player_scripting.c | 39
libswfdec/swfdec_player_scripting.h | 62
libswfdec/swfdec_text_field_movie_html.c | 2
libswfdec/swfdec_xml.c | 14
libswfdec/swfdec_xml.h | 3
test/trace/Makefile.am | 9
test/trace/externalinterface-escape-5.swf |binary
test/trace/externalinterface-escape-5.swf.trace | 1556 +++++++++++++++++++++++
test/trace/externalinterface-escape-6.swf |binary
test/trace/externalinterface-escape-6.swf.trace | 1555 +++++++++++++++++++++++
test/trace/externalinterface-escape-7.swf |binary
test/trace/externalinterface-escape-7.swf.trace | 1555 +++++++++++++++++++++++
test/trace/externalinterface-escape-8.swf |binary
test/trace/externalinterface-escape-8.swf.trace | 1558 ++++++++++++++++++++++++
test/trace/externalinterface-escape.as | 25
23 files changed, 6524 insertions(+), 26 deletions(-)
New commits:
commit 62a480eaa77fc633224786d302c096fe83ad5645
Author: Benjamin Otte <otte at gnome.org>
Date: Fri Dec 21 17:30:30 2007 +0100
only convert to int after having converted to twips
diff --git a/libswfdec/swfdec_movie_as_drawing.c b/libswfdec/swfdec_movie_as_drawing.c
index 599a553..bcedce6 100644
--- a/libswfdec/swfdec_movie_as_drawing.c
+++ b/libswfdec/swfdec_movie_as_drawing.c
@@ -266,9 +266,9 @@ swfdec_sprite_movie_moveTo (SwfdecAsContext *cx, SwfdecAsObject *object,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval)
{
SwfdecMovie *movie;
- int x, y;
+ double x, y;
- SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "|ii", &x, &y);
+ SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "|nn", &x, &y);
x = SWFDEC_DOUBLE_TO_TWIPS (x);
y = SWFDEC_DOUBLE_TO_TWIPS (y);
@@ -302,9 +302,9 @@ swfdec_sprite_movie_lineTo (SwfdecAsContext *cx, SwfdecAsObject *object,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval)
{
SwfdecMovie *movie;
- int x, y;
+ double x, y;
- SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "ii", &x, &y);
+ SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "nn", &x, &y);
x = SWFDEC_DOUBLE_TO_TWIPS (x);
y = SWFDEC_DOUBLE_TO_TWIPS (y);
@@ -326,9 +326,9 @@ swfdec_sprite_movie_curveTo (SwfdecAsContext *cx, SwfdecAsObject *object,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval)
{
SwfdecMovie *movie;
- int x, y, c_x, c_y;
+ double x, y, c_x, c_y;
- SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "iiii", &c_x, &c_y, &x, &y);
+ SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "nnnn", &c_x, &c_y, &x, &y);
x = SWFDEC_DOUBLE_TO_TWIPS (x);
y = SWFDEC_DOUBLE_TO_TWIPS (y);
commit fed39cbdc5e94ce0758571cdc77e97e0615977a3
Author: Benjamin Otte <otte at gnome.org>
Date: Fri Dec 21 14:18:17 2007 +0100
make the names of the vfuncs more clear
There's two methods to call external functions: XML and JavaScript. Only one
needs to be implemented.
diff --git a/libswfdec/swfdec_external_interface.c b/libswfdec/swfdec_external_interface.c
index f0d3421..5c79bcb 100644
--- a/libswfdec/swfdec_external_interface.c
+++ b/libswfdec/swfdec_external_interface.c
@@ -53,8 +53,8 @@ swfdec_external_interface__objectID (SwfdecAsContext *cx,
return;
}
klass = SWFDEC_PLAYER_SCRIPTING_GET_CLASS (scripting);
- if (klass->get_id) {
- char *s = klass->get_id (scripting, player);
+ if (klass->js_get_id) {
+ char *s = klass->js_get_id (scripting, player);
SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_give_string (cx, s));
} else {
SWFDEC_AS_VALUE_SET_STRING (ret, SWFDEC_AS_STR_EMPTY);
diff --git a/libswfdec/swfdec_player_scripting.h b/libswfdec/swfdec_player_scripting.h
index 4b6d9fc..8ad3c8f 100644
--- a/libswfdec/swfdec_player_scripting.h
+++ b/libswfdec/swfdec_player_scripting.h
@@ -45,12 +45,12 @@ struct _SwfdecPlayerScriptingClass
{
GObjectClass object_class;
- char * (* get_id) (SwfdecPlayerScripting *scripting,
+ char * (* js_get_id) (SwfdecPlayerScripting *scripting,
SwfdecPlayer * player);
- char * (* call_js) (SwfdecPlayerScripting *scripting,
+ char * (* js_call) (SwfdecPlayerScripting *scripting,
SwfdecPlayer * player,
const char * code);
- char * (* call_xml) (SwfdecPlayerScripting *scripting,
+ char * (* xml_call) (SwfdecPlayerScripting *scripting,
SwfdecPlayer * player,
const char * xml);
};
commit 7b8368b4166bcbec9fc4211c32daabdac5cdad30
Author: Benjamin Otte <otte at gnome.org>
Date: Fri Dec 21 14:14:55 2007 +0100
add a test for the ExternalInterface escaping functions
diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 83df525..75fa33c 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -933,6 +933,15 @@ EXTRA_DIST = \
extends-simple.swf.trace \
extends-super.swf \
extends-super.swf.trace \
+ externalinterface-escape.as \
+ externalinterface-escape-5.swf \
+ externalinterface-escape-5.swf.trace \
+ externalinterface-escape-6.swf \
+ externalinterface-escape-6.swf.trace \
+ externalinterface-escape-7.swf \
+ externalinterface-escape-7.swf.trace \
+ externalinterface-escape-8.swf \
+ externalinterface-escape-8.swf.trace \
file-reference-constructor.as \
file-reference-constructor-7.swf \
file-reference-constructor-7.swf.trace \
diff --git a/test/trace/externalinterface-escape-5.swf b/test/trace/externalinterface-escape-5.swf
new file mode 100644
index 0000000..6a7af61
Binary files /dev/null and b/test/trace/externalinterface-escape-5.swf differ
diff --git a/test/trace/externalinterface-escape-5.swf.trace b/test/trace/externalinterface-escape-5.swf.trace
new file mode 100644
index 0000000..1b5eff9
--- /dev/null
+++ b/test/trace/externalinterface-escape-5.swf.trace
@@ -0,0 +1,1556 @@
+>>> 0:
+undefined
+undefined
+undefined
+undefined
+>>> 1:
+undefined
+undefined
+undefined
+undefined
+>>> 2:
+undefined
+undefined
+undefined
+undefined
+>>> 3:
+undefined
+undefined
+undefined
+undefined
+>>> 4:
+undefined
+undefined
+undefined
+undefined
+>>> 5:
+undefined
+undefined
+undefined
+undefined
+>>> 6:
+undefined
+undefined
+undefined
+undefined
+>>> 7:
+undefined
+undefined
+undefined
+undefined
+>>> 8:
+undefined
+undefined
+undefined
+undefined
+>>> 9:
+undefined
+undefined
+undefined
+undefined
+>>> 10:
+
+undefined
+undefined
+undefined
+undefined
+>>> 11:
+undefined
+undefined
+undefined
+undefined
+>>> 12:
+undefined
+undefined
+undefined
+undefined
+>>> 13:
+undefined
+undefined
+undefined
+undefined
+>>> 14:
+undefined
+undefined
+undefined
+undefined
+>>> 15:
+undefined
+undefined
+undefined
+undefined
+>>> 16:
+undefined
+undefined
+undefined
+undefined
+>>> 17:
+undefined
+undefined
+undefined
+undefined
+>>> 18:
+undefined
+undefined
+undefined
+undefined
+>>> 19:
+undefined
+undefined
+undefined
+undefined
+>>> 20:
+undefined
+undefined
+undefined
+undefined
+>>> 21:
+undefined
+undefined
+undefined
+undefined
+>>> 22:
+undefined
+undefined
+undefined
+undefined
+>>> 23:
+undefined
+undefined
+undefined
+undefined
+>>> 24:
+undefined
+undefined
+undefined
+undefined
+>>> 25:
+undefined
+undefined
+undefined
+undefined
+>>> 26:
+undefined
+undefined
+undefined
+undefined
+>>> 27:
+undefined
+undefined
+undefined
+undefined
+>>> 28:
+undefined
+undefined
+undefined
+undefined
+>>> 29:
+undefined
+undefined
+undefined
+undefined
+>>> 30:
+undefined
+undefined
+undefined
+undefined
+>>> 31:
+undefined
+undefined
+undefined
+undefined
+>>> 32:
+undefined
+undefined
+undefined
+undefined
+>>> 33: !
+undefined
+undefined
+undefined
+undefined
+>>> 34: "
+undefined
+undefined
+undefined
+undefined
+>>> 35: #
+undefined
+undefined
+undefined
+undefined
+>>> 36: $
+undefined
+undefined
+undefined
+undefined
+>>> 37: %
+undefined
+undefined
+undefined
+undefined
+>>> 38: &
+undefined
+undefined
+undefined
+undefined
+>>> 39: '
+undefined
+undefined
+undefined
+undefined
+>>> 40: (
+undefined
+undefined
+undefined
+undefined
+>>> 41: )
+undefined
+undefined
+undefined
+undefined
+>>> 42: *
+undefined
+undefined
+undefined
+undefined
+>>> 43: +
+undefined
+undefined
+undefined
+undefined
+>>> 44: ,
+undefined
+undefined
+undefined
+undefined
+>>> 45: -
+undefined
+undefined
+undefined
+undefined
+>>> 46: .
+undefined
+undefined
+undefined
+undefined
+>>> 47: /
+undefined
+undefined
+undefined
+undefined
+>>> 48: 0
+undefined
+undefined
+undefined
+undefined
+>>> 49: 1
+undefined
+undefined
+undefined
+undefined
+>>> 50: 2
+undefined
+undefined
+undefined
+undefined
+>>> 51: 3
+undefined
+undefined
+undefined
+undefined
+>>> 52: 4
+undefined
+undefined
+undefined
+undefined
+>>> 53: 5
+undefined
+undefined
+undefined
+undefined
+>>> 54: 6
+undefined
+undefined
+undefined
+undefined
+>>> 55: 7
+undefined
+undefined
+undefined
+undefined
+>>> 56: 8
+undefined
+undefined
+undefined
+undefined
+>>> 57: 9
+undefined
+undefined
+undefined
+undefined
+>>> 58: :
+undefined
+undefined
+undefined
+undefined
+>>> 59: ;
+undefined
+undefined
+undefined
+undefined
+>>> 60: <
+undefined
+undefined
+undefined
+undefined
+>>> 61: =
+undefined
+undefined
+undefined
+undefined
+>>> 62: >
+undefined
+undefined
+undefined
+undefined
+>>> 63: ?
+undefined
+undefined
+undefined
+undefined
+>>> 64: @
+undefined
+undefined
+undefined
+undefined
+>>> 65: A
+undefined
+undefined
+undefined
+undefined
+>>> 66: B
+undefined
+undefined
+undefined
+undefined
+>>> 67: C
+undefined
+undefined
+undefined
+undefined
+>>> 68: D
+undefined
+undefined
+undefined
+undefined
+>>> 69: E
+undefined
+undefined
+undefined
+undefined
+>>> 70: F
+undefined
+undefined
+undefined
+undefined
+>>> 71: G
+undefined
+undefined
+undefined
+undefined
+>>> 72: H
+undefined
+undefined
+undefined
+undefined
+>>> 73: I
+undefined
+undefined
+undefined
+undefined
+>>> 74: J
+undefined
+undefined
+undefined
+undefined
+>>> 75: K
+undefined
+undefined
+undefined
+undefined
+>>> 76: L
+undefined
+undefined
+undefined
+undefined
+>>> 77: M
+undefined
+undefined
+undefined
+undefined
+>>> 78: N
+undefined
+undefined
+undefined
+undefined
+>>> 79: O
+undefined
+undefined
+undefined
+undefined
+>>> 80: P
+undefined
+undefined
+undefined
+undefined
+>>> 81: Q
+undefined
+undefined
+undefined
+undefined
+>>> 82: R
+undefined
+undefined
+undefined
+undefined
+>>> 83: S
+undefined
+undefined
+undefined
+undefined
+>>> 84: T
+undefined
+undefined
+undefined
+undefined
+>>> 85: U
+undefined
+undefined
+undefined
+undefined
+>>> 86: V
+undefined
+undefined
+undefined
+undefined
+>>> 87: W
+undefined
+undefined
+undefined
+undefined
+>>> 88: X
+undefined
+undefined
+undefined
+undefined
+>>> 89: Y
+undefined
+undefined
+undefined
+undefined
+>>> 90: Z
+undefined
+undefined
+undefined
+undefined
+>>> 91: [
+undefined
+undefined
+undefined
+undefined
+>>> 92: \
+undefined
+undefined
+undefined
+undefined
+>>> 93: ]
+undefined
+undefined
+undefined
+undefined
+>>> 94: ^
+undefined
+undefined
+undefined
+undefined
+>>> 95: _
+undefined
+undefined
+undefined
+undefined
+>>> 96: `
+undefined
+undefined
+undefined
+undefined
+>>> 97: a
+undefined
+undefined
+undefined
+undefined
+>>> 98: b
+undefined
+undefined
+undefined
+undefined
+>>> 99: c
+undefined
+undefined
+undefined
+undefined
+>>> 100: d
+undefined
+undefined
+undefined
+undefined
+>>> 101: e
+undefined
+undefined
+undefined
+undefined
+>>> 102: f
+undefined
+undefined
+undefined
+undefined
+>>> 103: g
+undefined
+undefined
+undefined
+undefined
+>>> 104: h
+undefined
+undefined
+undefined
+undefined
+>>> 105: i
+undefined
+undefined
+undefined
+undefined
+>>> 106: j
+undefined
+undefined
+undefined
+undefined
+>>> 107: k
+undefined
+undefined
+undefined
+undefined
+>>> 108: l
+undefined
+undefined
+undefined
+undefined
+>>> 109: m
+undefined
+undefined
+undefined
+undefined
+>>> 110: n
+undefined
+undefined
+undefined
+undefined
+>>> 111: o
+undefined
+undefined
+undefined
+undefined
+>>> 112: p
+undefined
+undefined
+undefined
+undefined
+>>> 113: q
+undefined
+undefined
+undefined
+undefined
+>>> 114: r
+undefined
+undefined
+undefined
+undefined
+>>> 115: s
+undefined
+undefined
+undefined
+undefined
+>>> 116: t
+undefined
+undefined
+undefined
+undefined
+>>> 117: u
+undefined
+undefined
+undefined
+undefined
+>>> 118: v
+undefined
+undefined
+undefined
+undefined
+>>> 119: w
+undefined
+undefined
+undefined
+undefined
+>>> 120: x
+undefined
+undefined
+undefined
+undefined
+>>> 121: y
+undefined
+undefined
+undefined
+undefined
+>>> 122: z
+undefined
+undefined
+undefined
+undefined
+>>> 123: {
+undefined
+undefined
+undefined
+undefined
+>>> 124: |
+undefined
+undefined
+undefined
+undefined
+>>> 125: }
+undefined
+undefined
+undefined
+undefined
+>>> 126: ~
+undefined
+undefined
+undefined
+undefined
+>>> 127:
+undefined
+undefined
+undefined
+undefined
+>>> 128: Â
+undefined
+undefined
+undefined
+undefined
+>>> 129: Â
+undefined
+undefined
+undefined
+undefined
+>>> 130: Â
+undefined
+undefined
+undefined
+undefined
+>>> 131: Â
+undefined
+undefined
+undefined
+undefined
+>>> 132: Â
+undefined
+undefined
+undefined
+undefined
+>>> 133: Â
+undefined
+undefined
+undefined
+undefined
+>>> 134: Â
+undefined
+undefined
+undefined
+undefined
+>>> 135: Â
+undefined
+undefined
+undefined
+undefined
+>>> 136: Â
+undefined
+undefined
+undefined
+undefined
+>>> 137: Â
+undefined
+undefined
+undefined
+undefined
+>>> 138: Â
+undefined
+undefined
+undefined
+undefined
+>>> 139: Â
+undefined
+undefined
+undefined
+undefined
+>>> 140: Â
+undefined
+undefined
+undefined
+undefined
+>>> 141: Â
+undefined
+undefined
+undefined
+undefined
+>>> 142: Â
+undefined
+undefined
+undefined
+undefined
+>>> 143: Â
+undefined
+undefined
+undefined
+undefined
+>>> 144: Â
+undefined
+undefined
+undefined
+undefined
+>>> 145: Â
+undefined
+undefined
+undefined
+undefined
+>>> 146: Â
+undefined
+undefined
+undefined
+undefined
+>>> 147: Â
+undefined
+undefined
+undefined
+undefined
+>>> 148: Â
+undefined
+undefined
+undefined
+undefined
+>>> 149: Â
+undefined
+undefined
+undefined
+undefined
+>>> 150: Â
+undefined
+undefined
+undefined
+undefined
+>>> 151: Â
+undefined
+undefined
+undefined
+undefined
+>>> 152: Â
+undefined
+undefined
+undefined
+undefined
+>>> 153: Â
+undefined
+undefined
+undefined
+undefined
+>>> 154: Â
+undefined
+undefined
+undefined
+undefined
+>>> 155: Â
+undefined
+undefined
+undefined
+undefined
+>>> 156: Â
+undefined
+undefined
+undefined
+undefined
+>>> 157: Â
+undefined
+undefined
+undefined
+undefined
+>>> 158: Â
+undefined
+undefined
+undefined
+undefined
+>>> 159: Â
+undefined
+undefined
+undefined
+undefined
+>>> 160: Â
+undefined
+undefined
+undefined
+undefined
+>>> 161: ¡
+undefined
+undefined
+undefined
+undefined
+>>> 162: ¢
+undefined
+undefined
+undefined
+undefined
+>>> 163: £
+undefined
+undefined
+undefined
+undefined
+>>> 164: ¤
+undefined
+undefined
+undefined
+undefined
+>>> 165: ¥
+undefined
+undefined
+undefined
+undefined
+>>> 166: ¦
+undefined
+undefined
+undefined
+undefined
+>>> 167: §
+undefined
+undefined
+undefined
+undefined
+>>> 168: ¨
+undefined
+undefined
+undefined
+undefined
+>>> 169: ©
+undefined
+undefined
+undefined
+undefined
+>>> 170: ª
+undefined
+undefined
+undefined
+undefined
+>>> 171: «
+undefined
+undefined
+undefined
+undefined
+>>> 172: ¬
+undefined
+undefined
+undefined
+undefined
+>>> 173: Â
+undefined
+undefined
+undefined
+undefined
+>>> 174: ®
+undefined
+undefined
+undefined
+undefined
+>>> 175: ¯
+undefined
+undefined
+undefined
+undefined
+>>> 176: °
+undefined
+undefined
+undefined
+undefined
+>>> 177: ±
+undefined
+undefined
+undefined
+undefined
+>>> 178: ²
+undefined
+undefined
+undefined
+undefined
+>>> 179: ³
+undefined
+undefined
+undefined
+undefined
+>>> 180: ´
+undefined
+undefined
+undefined
+undefined
+>>> 181: µ
+undefined
+undefined
+undefined
+undefined
+>>> 182: ¶
+undefined
+undefined
+undefined
+undefined
+>>> 183: ·
+undefined
+undefined
+undefined
+undefined
+>>> 184: ¸
+undefined
+undefined
+undefined
+undefined
+>>> 185: ¹
+undefined
+undefined
+undefined
+undefined
+>>> 186: º
+undefined
+undefined
+undefined
+undefined
+>>> 187: »
+undefined
+undefined
+undefined
+undefined
+>>> 188: ¼
+undefined
+undefined
+undefined
+undefined
+>>> 189: ½
+undefined
+undefined
+undefined
+undefined
+>>> 190: ¾
+undefined
+undefined
+undefined
+undefined
+>>> 191: ¿
+undefined
+undefined
+undefined
+undefined
+>>> 192: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 193: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 194: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 195: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 196: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 197: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 198: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 199: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 200: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 201: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 202: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 203: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 204: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 205: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 206: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 207: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 208: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 209: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 210: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 211: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 212: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 213: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 214: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 215: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 216: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 217: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 218: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 219: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 220: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 221: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 222: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 223: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 224: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 225: á
+undefined
+undefined
+undefined
+undefined
+>>> 226: â
+undefined
+undefined
+undefined
+undefined
+>>> 227: ã
+undefined
+undefined
+undefined
+undefined
+>>> 228: ä
+undefined
+undefined
+undefined
+undefined
+>>> 229: å
+undefined
+undefined
+undefined
+undefined
+>>> 230: æ
+undefined
+undefined
+undefined
+undefined
+>>> 231: ç
+undefined
+undefined
+undefined
+undefined
+>>> 232: è
+undefined
+undefined
+undefined
+undefined
+>>> 233: é
+undefined
+undefined
+undefined
+undefined
+>>> 234: ê
+undefined
+undefined
+undefined
+undefined
+>>> 235: ë
+undefined
+undefined
+undefined
+undefined
+>>> 236: ì
+undefined
+undefined
+undefined
+undefined
+>>> 237: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 238: î
+undefined
+undefined
+undefined
+undefined
+>>> 239: ï
+undefined
+undefined
+undefined
+undefined
+>>> 240: ð
+undefined
+undefined
+undefined
+undefined
+>>> 241: ñ
+undefined
+undefined
+undefined
+undefined
+>>> 242: ò
+undefined
+undefined
+undefined
+undefined
+>>> 243: ó
+undefined
+undefined
+undefined
+undefined
+>>> 244: ô
+undefined
+undefined
+undefined
+undefined
+>>> 245: õ
+undefined
+undefined
+undefined
+undefined
+>>> 246: ö
+undefined
+undefined
+undefined
+undefined
+>>> 247: ÷
+undefined
+undefined
+undefined
+undefined
+>>> 248: ø
+undefined
+undefined
+undefined
+undefined
+>>> 249: ù
+undefined
+undefined
+undefined
+undefined
+>>> 250: ú
+undefined
+undefined
+undefined
+undefined
+>>> 251: û
+undefined
+undefined
+undefined
+undefined
+>>> 252: ü
+undefined
+undefined
+undefined
+undefined
+>>> 253: ý
+undefined
+undefined
+undefined
+undefined
+>>> 254: þ
+undefined
+undefined
+undefined
+undefined
+>>> 255: ÿ
+undefined
+undefined
+undefined
+undefined
+>>> 256:
+undefined
+undefined
+undefined
+undefined
+>>> 257:
+undefined
+undefined
+undefined
+undefined
+>>> 258:
+undefined
+undefined
+undefined
+undefined
+>>> 259:
+undefined
+undefined
+undefined
+undefined
+>>> 260:
+undefined
+undefined
+undefined
+undefined
+>>> 261:
+undefined
+undefined
+undefined
+undefined
+>>> 262:
+undefined
+undefined
+undefined
+undefined
+>>> 263:
+undefined
+undefined
+undefined
+undefined
+>>> 264:
+undefined
+undefined
+undefined
+undefined
+>>> 265:
+undefined
+undefined
+undefined
+undefined
+>>> 266:
+
+undefined
+undefined
+undefined
+undefined
+>>> 267:
+undefined
+undefined
+undefined
+undefined
+>>> 268:
+undefined
+undefined
+undefined
+undefined
+>>> 269:
+undefined
+undefined
+undefined
+undefined
+>>> 270:
+undefined
+undefined
+undefined
+undefined
+>>> 271:
+undefined
+undefined
+undefined
+undefined
+>>> 272:
+undefined
+undefined
+undefined
+undefined
+>>> 273:
+undefined
+undefined
+undefined
+undefined
+>>> 274:
+undefined
+undefined
+undefined
+undefined
+>>> 275:
+undefined
+undefined
+undefined
+undefined
+>>> 276:
+undefined
+undefined
+undefined
+undefined
+>>> 277:
+undefined
+undefined
+undefined
+undefined
+>>> 278:
+undefined
+undefined
+undefined
+undefined
+>>> 279:
+undefined
+undefined
+undefined
+undefined
+>>> 280:
+undefined
+undefined
+undefined
+undefined
+>>> 281:
+undefined
+undefined
+undefined
+undefined
+>>> 282:
+undefined
+undefined
+undefined
+undefined
+>>> 283:
+undefined
+undefined
+undefined
+undefined
+>>> 284:
+undefined
+undefined
+undefined
+undefined
+>>> 285:
+undefined
+undefined
+undefined
+undefined
+>>> 286:
+undefined
+undefined
+undefined
+undefined
+>>> 287:
+undefined
+undefined
+undefined
+undefined
+>>> 288:
+undefined
+undefined
+undefined
+undefined
+>>> 289: !
+undefined
+undefined
+undefined
+undefined
+>>> 290: "
+undefined
+undefined
+undefined
+undefined
+>>> 291: #
+undefined
+undefined
+undefined
+undefined
+>>> 292: $
+undefined
+undefined
+undefined
+undefined
+>>> 293: %
+undefined
+undefined
+undefined
+undefined
+>>> 294: &
+undefined
+undefined
+undefined
+undefined
+>>> 295: '
+undefined
+undefined
+undefined
+undefined
+>>> 296: (
+undefined
+undefined
+undefined
+undefined
+>>> 297: )
+undefined
+undefined
+undefined
+undefined
+>>> 298: *
+undefined
+undefined
+undefined
+undefined
+>>> 299: +
+undefined
+undefined
+undefined
+undefined
+>>> 300:
+undefined
+undefined
+undefined
+undefined
+>>> 301: ""
+undefined
+undefined
+undefined
+undefined
+>>> 302: "
+undefined
+undefined
+undefined
+undefined
+>>> 303: '
+undefined
+undefined
+undefined
+undefined
+>>> 304:
+undefined
+undefined
+undefined
+undefined
+>>> 305: &
+undefined
+undefined
+undefined
+undefined
+>>> 306: &hi;
+undefined
+undefined
+undefined
+undefined
+>>> 307: &
+undefined
+undefined
+undefined
+undefined
+>>> 308: _root
+undefined
+undefined
+undefined
+undefined
+>>> 309: _level0
+undefined
+undefined
+undefined
+undefined
+>>> no args
+undefined
+undefined
+undefined
diff --git a/test/trace/externalinterface-escape-6.swf b/test/trace/externalinterface-escape-6.swf
new file mode 100644
index 0000000..9acad30
Binary files /dev/null and b/test/trace/externalinterface-escape-6.swf differ
diff --git a/test/trace/externalinterface-escape-6.swf.trace b/test/trace/externalinterface-escape-6.swf.trace
new file mode 100644
index 0000000..70647c3
--- /dev/null
+++ b/test/trace/externalinterface-escape-6.swf.trace
@@ -0,0 +1,1555 @@
+>>> 0:
+undefined
+undefined
+undefined
+undefined
+>>> 1:
+undefined
+undefined
+undefined
+undefined
+>>> 2:
+undefined
+undefined
+undefined
+undefined
+>>> 3:
+undefined
+undefined
+undefined
+undefined
+>>> 4:
+undefined
+undefined
+undefined
+undefined
+>>> 5:
+undefined
+undefined
+undefined
+undefined
+>>> 6:
+undefined
+undefined
+undefined
+undefined
+>>> 7:
+undefined
+undefined
+undefined
+undefined
+>>> 8:
+undefined
+undefined
+undefined
+undefined
+>>> 9:
+undefined
+undefined
+undefined
+undefined
+>>> 10:
+
+undefined
+undefined
+undefined
+undefined
+>>> 11:
+undefined
+undefined
+undefined
+undefined
+>>> 12:
+undefined
+undefined
+undefined
+undefined
+>>> 13:
+undefined
+undefined
+undefined
+undefined
+>>> 14:
+undefined
+undefined
+undefined
+undefined
+>>> 15:
+undefined
+undefined
+undefined
+undefined
+>>> 16:
+undefined
+undefined
+undefined
+undefined
+>>> 17:
+undefined
+undefined
+undefined
+undefined
+>>> 18:
+undefined
+undefined
+undefined
+undefined
+>>> 19:
+undefined
+undefined
+undefined
+undefined
+>>> 20:
+undefined
+undefined
+undefined
+undefined
+>>> 21:
+undefined
+undefined
+undefined
+undefined
+>>> 22:
+undefined
+undefined
+undefined
+undefined
+>>> 23:
+undefined
+undefined
+undefined
+undefined
+>>> 24:
+undefined
+undefined
+undefined
+undefined
+>>> 25:
+undefined
+undefined
+undefined
+undefined
+>>> 26:
+undefined
+undefined
+undefined
+undefined
+>>> 27:
+undefined
+undefined
+undefined
+undefined
+>>> 28:
+undefined
+undefined
+undefined
+undefined
+>>> 29:
+undefined
+undefined
+undefined
+undefined
+>>> 30:
+undefined
+undefined
+undefined
+undefined
+>>> 31:
+undefined
+undefined
+undefined
+undefined
+>>> 32:
+undefined
+undefined
+undefined
+undefined
+>>> 33: !
+undefined
+undefined
+undefined
+undefined
+>>> 34: "
+undefined
+undefined
+undefined
+undefined
+>>> 35: #
+undefined
+undefined
+undefined
+undefined
+>>> 36: $
+undefined
+undefined
+undefined
+undefined
+>>> 37: %
+undefined
+undefined
+undefined
+undefined
+>>> 38: &
+undefined
+undefined
+undefined
+undefined
+>>> 39: '
+undefined
+undefined
+undefined
+undefined
+>>> 40: (
+undefined
+undefined
+undefined
+undefined
+>>> 41: )
+undefined
+undefined
+undefined
+undefined
+>>> 42: *
+undefined
+undefined
+undefined
+undefined
+>>> 43: +
+undefined
+undefined
+undefined
+undefined
+>>> 44: ,
+undefined
+undefined
+undefined
+undefined
+>>> 45: -
+undefined
+undefined
+undefined
+undefined
+>>> 46: .
+undefined
+undefined
+undefined
+undefined
+>>> 47: /
+undefined
+undefined
+undefined
+undefined
+>>> 48: 0
+undefined
+undefined
+undefined
+undefined
+>>> 49: 1
+undefined
+undefined
+undefined
+undefined
+>>> 50: 2
+undefined
+undefined
+undefined
+undefined
+>>> 51: 3
+undefined
+undefined
+undefined
+undefined
+>>> 52: 4
+undefined
+undefined
+undefined
+undefined
+>>> 53: 5
+undefined
+undefined
+undefined
+undefined
+>>> 54: 6
+undefined
+undefined
+undefined
+undefined
+>>> 55: 7
+undefined
+undefined
+undefined
+undefined
+>>> 56: 8
+undefined
+undefined
+undefined
+undefined
+>>> 57: 9
+undefined
+undefined
+undefined
+undefined
+>>> 58: :
+undefined
+undefined
+undefined
+undefined
+>>> 59: ;
+undefined
+undefined
+undefined
+undefined
+>>> 60: <
+undefined
+undefined
+undefined
+undefined
+>>> 61: =
+undefined
+undefined
+undefined
+undefined
+>>> 62: >
+undefined
+undefined
+undefined
+undefined
+>>> 63: ?
+undefined
+undefined
+undefined
+undefined
+>>> 64: @
+undefined
+undefined
+undefined
+undefined
+>>> 65: A
+undefined
+undefined
+undefined
+undefined
+>>> 66: B
+undefined
+undefined
+undefined
+undefined
+>>> 67: C
+undefined
+undefined
+undefined
+undefined
+>>> 68: D
+undefined
+undefined
+undefined
+undefined
+>>> 69: E
+undefined
+undefined
+undefined
+undefined
+>>> 70: F
+undefined
+undefined
+undefined
+undefined
+>>> 71: G
+undefined
+undefined
+undefined
+undefined
+>>> 72: H
+undefined
+undefined
+undefined
+undefined
+>>> 73: I
+undefined
+undefined
+undefined
+undefined
+>>> 74: J
+undefined
+undefined
+undefined
+undefined
+>>> 75: K
+undefined
+undefined
+undefined
+undefined
+>>> 76: L
+undefined
+undefined
+undefined
+undefined
+>>> 77: M
+undefined
+undefined
+undefined
+undefined
+>>> 78: N
+undefined
+undefined
+undefined
+undefined
+>>> 79: O
+undefined
+undefined
+undefined
+undefined
+>>> 80: P
+undefined
+undefined
+undefined
+undefined
+>>> 81: Q
+undefined
+undefined
+undefined
+undefined
+>>> 82: R
+undefined
+undefined
+undefined
+undefined
+>>> 83: S
+undefined
+undefined
+undefined
+undefined
+>>> 84: T
+undefined
+undefined
+undefined
+undefined
+>>> 85: U
+undefined
+undefined
+undefined
+undefined
+>>> 86: V
+undefined
+undefined
+undefined
+undefined
+>>> 87: W
+undefined
+undefined
+undefined
+undefined
+>>> 88: X
+undefined
+undefined
+undefined
+undefined
+>>> 89: Y
+undefined
+undefined
+undefined
+undefined
+>>> 90: Z
+undefined
+undefined
+undefined
+undefined
+>>> 91: [
+undefined
+undefined
+undefined
+undefined
+>>> 92: \
+undefined
+undefined
+undefined
+undefined
+>>> 93: ]
+undefined
+undefined
+undefined
+undefined
+>>> 94: ^
+undefined
+undefined
+undefined
+undefined
+>>> 95: _
+undefined
+undefined
+undefined
+undefined
+>>> 96: `
+undefined
+undefined
+undefined
+undefined
+>>> 97: a
+undefined
+undefined
+undefined
+undefined
+>>> 98: b
+undefined
+undefined
+undefined
+undefined
+>>> 99: c
+undefined
+undefined
+undefined
+undefined
+>>> 100: d
+undefined
+undefined
+undefined
+undefined
+>>> 101: e
+undefined
+undefined
+undefined
+undefined
+>>> 102: f
+undefined
+undefined
+undefined
+undefined
+>>> 103: g
+undefined
+undefined
+undefined
+undefined
+>>> 104: h
+undefined
+undefined
+undefined
+undefined
+>>> 105: i
+undefined
+undefined
+undefined
+undefined
+>>> 106: j
+undefined
+undefined
+undefined
+undefined
+>>> 107: k
+undefined
+undefined
+undefined
+undefined
+>>> 108: l
+undefined
+undefined
+undefined
+undefined
+>>> 109: m
+undefined
+undefined
+undefined
+undefined
+>>> 110: n
+undefined
+undefined
+undefined
+undefined
+>>> 111: o
+undefined
+undefined
+undefined
+undefined
+>>> 112: p
+undefined
+undefined
+undefined
+undefined
+>>> 113: q
+undefined
+undefined
+undefined
+undefined
+>>> 114: r
+undefined
+undefined
+undefined
+undefined
+>>> 115: s
+undefined
+undefined
+undefined
+undefined
+>>> 116: t
+undefined
+undefined
+undefined
+undefined
+>>> 117: u
+undefined
+undefined
+undefined
+undefined
+>>> 118: v
+undefined
+undefined
+undefined
+undefined
+>>> 119: w
+undefined
+undefined
+undefined
+undefined
+>>> 120: x
+undefined
+undefined
+undefined
+undefined
+>>> 121: y
+undefined
+undefined
+undefined
+undefined
+>>> 122: z
+undefined
+undefined
+undefined
+undefined
+>>> 123: {
+undefined
+undefined
+undefined
+undefined
+>>> 124: |
+undefined
+undefined
+undefined
+undefined
+>>> 125: }
+undefined
+undefined
+undefined
+undefined
+>>> 126: ~
+undefined
+undefined
+undefined
+undefined
+>>> 127:
+undefined
+undefined
+undefined
+undefined
+>>> 128: Â
+undefined
+undefined
+undefined
+undefined
+>>> 129: Â
+undefined
+undefined
+undefined
+undefined
+>>> 130: Â
+undefined
+undefined
+undefined
+undefined
+>>> 131: Â
+undefined
+undefined
+undefined
+undefined
+>>> 132: Â
+undefined
+undefined
+undefined
+undefined
+>>> 133: Â
+undefined
+undefined
+undefined
+undefined
+>>> 134: Â
+undefined
+undefined
+undefined
+undefined
+>>> 135: Â
+undefined
+undefined
+undefined
+undefined
+>>> 136: Â
+undefined
+undefined
+undefined
+undefined
+>>> 137: Â
+undefined
+undefined
+undefined
+undefined
+>>> 138: Â
+undefined
+undefined
+undefined
+undefined
+>>> 139: Â
+undefined
+undefined
+undefined
+undefined
+>>> 140: Â
+undefined
+undefined
+undefined
+undefined
+>>> 141: Â
+undefined
+undefined
+undefined
+undefined
+>>> 142: Â
+undefined
+undefined
+undefined
+undefined
+>>> 143: Â
+undefined
+undefined
+undefined
+undefined
+>>> 144: Â
+undefined
+undefined
+undefined
+undefined
+>>> 145: Â
+undefined
+undefined
+undefined
+undefined
+>>> 146: Â
+undefined
+undefined
+undefined
+undefined
+>>> 147: Â
+undefined
+undefined
+undefined
+undefined
+>>> 148: Â
+undefined
+undefined
+undefined
+undefined
+>>> 149: Â
+undefined
+undefined
+undefined
+undefined
+>>> 150: Â
+undefined
+undefined
+undefined
+undefined
+>>> 151: Â
+undefined
+undefined
+undefined
+undefined
+>>> 152: Â
+undefined
+undefined
+undefined
+undefined
+>>> 153: Â
+undefined
+undefined
+undefined
+undefined
+>>> 154: Â
+undefined
+undefined
+undefined
+undefined
+>>> 155: Â
+undefined
+undefined
+undefined
+undefined
+>>> 156: Â
+undefined
+undefined
+undefined
+undefined
+>>> 157: Â
+undefined
+undefined
+undefined
+undefined
+>>> 158: Â
+undefined
+undefined
+undefined
+undefined
+>>> 159: Â
+undefined
+undefined
+undefined
+undefined
+>>> 160: Â
+undefined
+undefined
+undefined
+undefined
+>>> 161: ¡
+undefined
+undefined
+undefined
+undefined
+>>> 162: ¢
+undefined
+undefined
+undefined
+undefined
+>>> 163: £
+undefined
+undefined
+undefined
+undefined
+>>> 164: ¤
+undefined
+undefined
+undefined
+undefined
+>>> 165: ¥
+undefined
+undefined
+undefined
+undefined
+>>> 166: ¦
+undefined
+undefined
+undefined
+undefined
+>>> 167: §
+undefined
+undefined
+undefined
+undefined
+>>> 168: ¨
+undefined
+undefined
+undefined
+undefined
+>>> 169: ©
+undefined
+undefined
+undefined
+undefined
+>>> 170: ª
+undefined
+undefined
+undefined
+undefined
+>>> 171: «
+undefined
+undefined
+undefined
+undefined
+>>> 172: ¬
+undefined
+undefined
+undefined
+undefined
+>>> 173: Â
+undefined
+undefined
+undefined
+undefined
+>>> 174: ®
+undefined
+undefined
+undefined
+undefined
+>>> 175: ¯
+undefined
+undefined
+undefined
+undefined
+>>> 176: °
+undefined
+undefined
+undefined
+undefined
+>>> 177: ±
+undefined
+undefined
+undefined
+undefined
+>>> 178: ²
+undefined
+undefined
+undefined
+undefined
+>>> 179: ³
+undefined
+undefined
+undefined
+undefined
+>>> 180: ´
+undefined
+undefined
+undefined
+undefined
+>>> 181: µ
+undefined
+undefined
+undefined
+undefined
+>>> 182: ¶
+undefined
+undefined
+undefined
+undefined
+>>> 183: ·
+undefined
+undefined
+undefined
+undefined
+>>> 184: ¸
+undefined
+undefined
+undefined
+undefined
+>>> 185: ¹
+undefined
+undefined
+undefined
+undefined
+>>> 186: º
+undefined
+undefined
+undefined
+undefined
+>>> 187: »
+undefined
+undefined
+undefined
+undefined
+>>> 188: ¼
+undefined
+undefined
+undefined
+undefined
+>>> 189: ½
+undefined
+undefined
+undefined
+undefined
+>>> 190: ¾
+undefined
+undefined
+undefined
+undefined
+>>> 191: ¿
+undefined
+undefined
+undefined
+undefined
+>>> 192: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 193: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 194: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 195: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 196: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 197: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 198: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 199: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 200: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 201: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 202: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 203: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 204: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 205: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 206: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 207: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 208: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 209: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 210: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 211: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 212: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 213: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 214: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 215: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 216: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 217: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 218: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 219: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 220: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 221: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 222: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 223: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 224: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 225: á
+undefined
+undefined
+undefined
+undefined
+>>> 226: â
+undefined
+undefined
+undefined
+undefined
+>>> 227: ã
+undefined
+undefined
+undefined
+undefined
+>>> 228: ä
+undefined
+undefined
+undefined
+undefined
+>>> 229: å
+undefined
+undefined
+undefined
+undefined
+>>> 230: æ
+undefined
+undefined
+undefined
+undefined
+>>> 231: ç
+undefined
+undefined
+undefined
+undefined
+>>> 232: è
+undefined
+undefined
+undefined
+undefined
+>>> 233: é
+undefined
+undefined
+undefined
+undefined
+>>> 234: ê
+undefined
+undefined
+undefined
+undefined
+>>> 235: ë
+undefined
+undefined
+undefined
+undefined
+>>> 236: ì
+undefined
+undefined
+undefined
+undefined
+>>> 237: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 238: î
+undefined
+undefined
+undefined
+undefined
+>>> 239: ï
+undefined
+undefined
+undefined
+undefined
+>>> 240: ð
+undefined
+undefined
+undefined
+undefined
+>>> 241: ñ
+undefined
+undefined
+undefined
+undefined
+>>> 242: ò
+undefined
+undefined
+undefined
+undefined
+>>> 243: ó
+undefined
+undefined
+undefined
+undefined
+>>> 244: ô
+undefined
+undefined
+undefined
+undefined
+>>> 245: õ
+undefined
+undefined
+undefined
+undefined
+>>> 246: ö
+undefined
+undefined
+undefined
+undefined
+>>> 247: ÷
+undefined
+undefined
+undefined
+undefined
+>>> 248: ø
+undefined
+undefined
+undefined
+undefined
+>>> 249: ù
+undefined
+undefined
+undefined
+undefined
+>>> 250: ú
+undefined
+undefined
+undefined
+undefined
+>>> 251: û
+undefined
+undefined
+undefined
+undefined
+>>> 252: ü
+undefined
+undefined
+undefined
+undefined
+>>> 253: ý
+undefined
+undefined
+undefined
+undefined
+>>> 254: þ
+undefined
+undefined
+undefined
+undefined
+>>> 255: ÿ
+undefined
+undefined
+undefined
+undefined
+>>> 256: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 257: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 258: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 259: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 260: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 261: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 262: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 263: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 264: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 265: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 266: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 267: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 268: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 269: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 270: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 271: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 272: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 273: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 274: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 275: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 276: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 277: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 278: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 279: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 280: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 281: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 282: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 283: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 284: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 285: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 286: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 287: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 288: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 289: Ä¡
+undefined
+undefined
+undefined
+undefined
+>>> 290: Ģ
+undefined
+undefined
+undefined
+undefined
+>>> 291: ģ
+undefined
+undefined
+undefined
+undefined
+>>> 292: Ĥ
+undefined
+undefined
+undefined
+undefined
+>>> 293: ĥ
+undefined
+undefined
+undefined
+undefined
+>>> 294: Ħ
+undefined
+undefined
+undefined
+undefined
+>>> 295: ħ
+undefined
+undefined
+undefined
+undefined
+>>> 296: Ĩ
+undefined
+undefined
+undefined
+undefined
+>>> 297: Ä©
+undefined
+undefined
+undefined
+undefined
+>>> 298: Ī
+undefined
+undefined
+undefined
+undefined
+>>> 299: Ä«
+undefined
+undefined
+undefined
+undefined
+>>> 300:
+undefined
+undefined
+undefined
+undefined
+>>> 301: ""
+undefined
+undefined
+undefined
+undefined
+>>> 302: "
+undefined
+undefined
+undefined
+undefined
+>>> 303: '
+undefined
+undefined
+undefined
+undefined
+>>> 304:
+undefined
+undefined
+undefined
+undefined
+>>> 305: &
+undefined
+undefined
+undefined
+undefined
+>>> 306: &hi;
+undefined
+undefined
+undefined
+undefined
+>>> 307: &
+undefined
+undefined
+undefined
+undefined
+>>> 308: _root
+undefined
+undefined
+undefined
+undefined
+>>> 309: _level0
+undefined
+undefined
+undefined
+undefined
+>>> no args
+undefined
+undefined
+undefined
diff --git a/test/trace/externalinterface-escape-7.swf b/test/trace/externalinterface-escape-7.swf
new file mode 100644
index 0000000..fa8c270
Binary files /dev/null and b/test/trace/externalinterface-escape-7.swf differ
diff --git a/test/trace/externalinterface-escape-7.swf.trace b/test/trace/externalinterface-escape-7.swf.trace
new file mode 100644
index 0000000..70647c3
--- /dev/null
+++ b/test/trace/externalinterface-escape-7.swf.trace
@@ -0,0 +1,1555 @@
+>>> 0:
+undefined
+undefined
+undefined
+undefined
+>>> 1:
+undefined
+undefined
+undefined
+undefined
+>>> 2:
+undefined
+undefined
+undefined
+undefined
+>>> 3:
+undefined
+undefined
+undefined
+undefined
+>>> 4:
+undefined
+undefined
+undefined
+undefined
+>>> 5:
+undefined
+undefined
+undefined
+undefined
+>>> 6:
+undefined
+undefined
+undefined
+undefined
+>>> 7:
+undefined
+undefined
+undefined
+undefined
+>>> 8:
+undefined
+undefined
+undefined
+undefined
+>>> 9:
+undefined
+undefined
+undefined
+undefined
+>>> 10:
+
+undefined
+undefined
+undefined
+undefined
+>>> 11:
+undefined
+undefined
+undefined
+undefined
+>>> 12:
+undefined
+undefined
+undefined
+undefined
+>>> 13:
+undefined
+undefined
+undefined
+undefined
+>>> 14:
+undefined
+undefined
+undefined
+undefined
+>>> 15:
+undefined
+undefined
+undefined
+undefined
+>>> 16:
+undefined
+undefined
+undefined
+undefined
+>>> 17:
+undefined
+undefined
+undefined
+undefined
+>>> 18:
+undefined
+undefined
+undefined
+undefined
+>>> 19:
+undefined
+undefined
+undefined
+undefined
+>>> 20:
+undefined
+undefined
+undefined
+undefined
+>>> 21:
+undefined
+undefined
+undefined
+undefined
+>>> 22:
+undefined
+undefined
+undefined
+undefined
+>>> 23:
+undefined
+undefined
+undefined
+undefined
+>>> 24:
+undefined
+undefined
+undefined
+undefined
+>>> 25:
+undefined
+undefined
+undefined
+undefined
+>>> 26:
+undefined
+undefined
+undefined
+undefined
+>>> 27:
+undefined
+undefined
+undefined
+undefined
+>>> 28:
+undefined
+undefined
+undefined
+undefined
+>>> 29:
+undefined
+undefined
+undefined
+undefined
+>>> 30:
+undefined
+undefined
+undefined
+undefined
+>>> 31:
+undefined
+undefined
+undefined
+undefined
+>>> 32:
+undefined
+undefined
+undefined
+undefined
+>>> 33: !
+undefined
+undefined
+undefined
+undefined
+>>> 34: "
+undefined
+undefined
+undefined
+undefined
+>>> 35: #
+undefined
+undefined
+undefined
+undefined
+>>> 36: $
+undefined
+undefined
+undefined
+undefined
+>>> 37: %
+undefined
+undefined
+undefined
+undefined
+>>> 38: &
+undefined
+undefined
+undefined
+undefined
+>>> 39: '
+undefined
+undefined
+undefined
+undefined
+>>> 40: (
+undefined
+undefined
+undefined
+undefined
+>>> 41: )
+undefined
+undefined
+undefined
+undefined
+>>> 42: *
+undefined
+undefined
+undefined
+undefined
+>>> 43: +
+undefined
+undefined
+undefined
+undefined
+>>> 44: ,
+undefined
+undefined
+undefined
+undefined
+>>> 45: -
+undefined
+undefined
+undefined
+undefined
+>>> 46: .
+undefined
+undefined
+undefined
+undefined
+>>> 47: /
+undefined
+undefined
+undefined
+undefined
+>>> 48: 0
+undefined
+undefined
+undefined
+undefined
+>>> 49: 1
+undefined
+undefined
+undefined
+undefined
+>>> 50: 2
+undefined
+undefined
+undefined
+undefined
+>>> 51: 3
+undefined
+undefined
+undefined
+undefined
+>>> 52: 4
+undefined
+undefined
+undefined
+undefined
+>>> 53: 5
+undefined
+undefined
+undefined
+undefined
+>>> 54: 6
+undefined
+undefined
+undefined
+undefined
+>>> 55: 7
+undefined
+undefined
+undefined
+undefined
+>>> 56: 8
+undefined
+undefined
+undefined
+undefined
+>>> 57: 9
+undefined
+undefined
+undefined
+undefined
+>>> 58: :
+undefined
+undefined
+undefined
+undefined
+>>> 59: ;
+undefined
+undefined
+undefined
+undefined
+>>> 60: <
+undefined
+undefined
+undefined
+undefined
+>>> 61: =
+undefined
+undefined
+undefined
+undefined
+>>> 62: >
+undefined
+undefined
+undefined
+undefined
+>>> 63: ?
+undefined
+undefined
+undefined
+undefined
+>>> 64: @
+undefined
+undefined
+undefined
+undefined
+>>> 65: A
+undefined
+undefined
+undefined
+undefined
+>>> 66: B
+undefined
+undefined
+undefined
+undefined
+>>> 67: C
+undefined
+undefined
+undefined
+undefined
+>>> 68: D
+undefined
+undefined
+undefined
+undefined
+>>> 69: E
+undefined
+undefined
+undefined
+undefined
+>>> 70: F
+undefined
+undefined
+undefined
+undefined
+>>> 71: G
+undefined
+undefined
+undefined
+undefined
+>>> 72: H
+undefined
+undefined
+undefined
+undefined
+>>> 73: I
+undefined
+undefined
+undefined
+undefined
+>>> 74: J
+undefined
+undefined
+undefined
+undefined
+>>> 75: K
+undefined
+undefined
+undefined
+undefined
+>>> 76: L
+undefined
+undefined
+undefined
+undefined
+>>> 77: M
+undefined
+undefined
+undefined
+undefined
+>>> 78: N
+undefined
+undefined
+undefined
+undefined
+>>> 79: O
+undefined
+undefined
+undefined
+undefined
+>>> 80: P
+undefined
+undefined
+undefined
+undefined
+>>> 81: Q
+undefined
+undefined
+undefined
+undefined
+>>> 82: R
+undefined
+undefined
+undefined
+undefined
+>>> 83: S
+undefined
+undefined
+undefined
+undefined
+>>> 84: T
+undefined
+undefined
+undefined
+undefined
+>>> 85: U
+undefined
+undefined
+undefined
+undefined
+>>> 86: V
+undefined
+undefined
+undefined
+undefined
+>>> 87: W
+undefined
+undefined
+undefined
+undefined
+>>> 88: X
+undefined
+undefined
+undefined
+undefined
+>>> 89: Y
+undefined
+undefined
+undefined
+undefined
+>>> 90: Z
+undefined
+undefined
+undefined
+undefined
+>>> 91: [
+undefined
+undefined
+undefined
+undefined
+>>> 92: \
+undefined
+undefined
+undefined
+undefined
+>>> 93: ]
+undefined
+undefined
+undefined
+undefined
+>>> 94: ^
+undefined
+undefined
+undefined
+undefined
+>>> 95: _
+undefined
+undefined
+undefined
+undefined
+>>> 96: `
+undefined
+undefined
+undefined
+undefined
+>>> 97: a
+undefined
+undefined
+undefined
+undefined
+>>> 98: b
+undefined
+undefined
+undefined
+undefined
+>>> 99: c
+undefined
+undefined
+undefined
+undefined
+>>> 100: d
+undefined
+undefined
+undefined
+undefined
+>>> 101: e
+undefined
+undefined
+undefined
+undefined
+>>> 102: f
+undefined
+undefined
+undefined
+undefined
+>>> 103: g
+undefined
+undefined
+undefined
+undefined
+>>> 104: h
+undefined
+undefined
+undefined
+undefined
+>>> 105: i
+undefined
+undefined
+undefined
+undefined
+>>> 106: j
+undefined
+undefined
+undefined
+undefined
+>>> 107: k
+undefined
+undefined
+undefined
+undefined
+>>> 108: l
+undefined
+undefined
+undefined
+undefined
+>>> 109: m
+undefined
+undefined
+undefined
+undefined
+>>> 110: n
+undefined
+undefined
+undefined
+undefined
+>>> 111: o
+undefined
+undefined
+undefined
+undefined
+>>> 112: p
+undefined
+undefined
+undefined
+undefined
+>>> 113: q
+undefined
+undefined
+undefined
+undefined
+>>> 114: r
+undefined
+undefined
+undefined
+undefined
+>>> 115: s
+undefined
+undefined
+undefined
+undefined
+>>> 116: t
+undefined
+undefined
+undefined
+undefined
+>>> 117: u
+undefined
+undefined
+undefined
+undefined
+>>> 118: v
+undefined
+undefined
+undefined
+undefined
+>>> 119: w
+undefined
+undefined
+undefined
+undefined
+>>> 120: x
+undefined
+undefined
+undefined
+undefined
+>>> 121: y
+undefined
+undefined
+undefined
+undefined
+>>> 122: z
+undefined
+undefined
+undefined
+undefined
+>>> 123: {
+undefined
+undefined
+undefined
+undefined
+>>> 124: |
+undefined
+undefined
+undefined
+undefined
+>>> 125: }
+undefined
+undefined
+undefined
+undefined
+>>> 126: ~
+undefined
+undefined
+undefined
+undefined
+>>> 127:
+undefined
+undefined
+undefined
+undefined
+>>> 128: Â
+undefined
+undefined
+undefined
+undefined
+>>> 129: Â
+undefined
+undefined
+undefined
+undefined
+>>> 130: Â
+undefined
+undefined
+undefined
+undefined
+>>> 131: Â
+undefined
+undefined
+undefined
+undefined
+>>> 132: Â
+undefined
+undefined
+undefined
+undefined
+>>> 133: Â
+undefined
+undefined
+undefined
+undefined
+>>> 134: Â
+undefined
+undefined
+undefined
+undefined
+>>> 135: Â
+undefined
+undefined
+undefined
+undefined
+>>> 136: Â
+undefined
+undefined
+undefined
+undefined
+>>> 137: Â
+undefined
+undefined
+undefined
+undefined
+>>> 138: Â
+undefined
+undefined
+undefined
+undefined
+>>> 139: Â
+undefined
+undefined
+undefined
+undefined
+>>> 140: Â
+undefined
+undefined
+undefined
+undefined
+>>> 141: Â
+undefined
+undefined
+undefined
+undefined
+>>> 142: Â
+undefined
+undefined
+undefined
+undefined
+>>> 143: Â
+undefined
+undefined
+undefined
+undefined
+>>> 144: Â
+undefined
+undefined
+undefined
+undefined
+>>> 145: Â
+undefined
+undefined
+undefined
+undefined
+>>> 146: Â
+undefined
+undefined
+undefined
+undefined
+>>> 147: Â
+undefined
+undefined
+undefined
+undefined
+>>> 148: Â
+undefined
+undefined
+undefined
+undefined
+>>> 149: Â
+undefined
+undefined
+undefined
+undefined
+>>> 150: Â
+undefined
+undefined
+undefined
+undefined
+>>> 151: Â
+undefined
+undefined
+undefined
+undefined
+>>> 152: Â
+undefined
+undefined
+undefined
+undefined
+>>> 153: Â
+undefined
+undefined
+undefined
+undefined
+>>> 154: Â
+undefined
+undefined
+undefined
+undefined
+>>> 155: Â
+undefined
+undefined
+undefined
+undefined
+>>> 156: Â
+undefined
+undefined
+undefined
+undefined
+>>> 157: Â
+undefined
+undefined
+undefined
+undefined
+>>> 158: Â
+undefined
+undefined
+undefined
+undefined
+>>> 159: Â
+undefined
+undefined
+undefined
+undefined
+>>> 160: Â
+undefined
+undefined
+undefined
+undefined
+>>> 161: ¡
+undefined
+undefined
+undefined
+undefined
+>>> 162: ¢
+undefined
+undefined
+undefined
+undefined
+>>> 163: £
+undefined
+undefined
+undefined
+undefined
+>>> 164: ¤
+undefined
+undefined
+undefined
+undefined
+>>> 165: ¥
+undefined
+undefined
+undefined
+undefined
+>>> 166: ¦
+undefined
+undefined
+undefined
+undefined
+>>> 167: §
+undefined
+undefined
+undefined
+undefined
+>>> 168: ¨
+undefined
+undefined
+undefined
+undefined
+>>> 169: ©
+undefined
+undefined
+undefined
+undefined
+>>> 170: ª
+undefined
+undefined
+undefined
+undefined
+>>> 171: «
+undefined
+undefined
+undefined
+undefined
+>>> 172: ¬
+undefined
+undefined
+undefined
+undefined
+>>> 173: Â
+undefined
+undefined
+undefined
+undefined
+>>> 174: ®
+undefined
+undefined
+undefined
+undefined
+>>> 175: ¯
+undefined
+undefined
+undefined
+undefined
+>>> 176: °
+undefined
+undefined
+undefined
+undefined
+>>> 177: ±
+undefined
+undefined
+undefined
+undefined
+>>> 178: ²
+undefined
+undefined
+undefined
+undefined
+>>> 179: ³
+undefined
+undefined
+undefined
+undefined
+>>> 180: ´
+undefined
+undefined
+undefined
+undefined
+>>> 181: µ
+undefined
+undefined
+undefined
+undefined
+>>> 182: ¶
+undefined
+undefined
+undefined
+undefined
+>>> 183: ·
+undefined
+undefined
+undefined
+undefined
+>>> 184: ¸
+undefined
+undefined
+undefined
+undefined
+>>> 185: ¹
+undefined
+undefined
+undefined
+undefined
+>>> 186: º
+undefined
+undefined
+undefined
+undefined
+>>> 187: »
+undefined
+undefined
+undefined
+undefined
+>>> 188: ¼
+undefined
+undefined
+undefined
+undefined
+>>> 189: ½
+undefined
+undefined
+undefined
+undefined
+>>> 190: ¾
+undefined
+undefined
+undefined
+undefined
+>>> 191: ¿
+undefined
+undefined
+undefined
+undefined
+>>> 192: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 193: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 194: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 195: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 196: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 197: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 198: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 199: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 200: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 201: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 202: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 203: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 204: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 205: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 206: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 207: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 208: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 209: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 210: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 211: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 212: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 213: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 214: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 215: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 216: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 217: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 218: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 219: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 220: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 221: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 222: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 223: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 224: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 225: á
+undefined
+undefined
+undefined
+undefined
+>>> 226: â
+undefined
+undefined
+undefined
+undefined
+>>> 227: ã
+undefined
+undefined
+undefined
+undefined
+>>> 228: ä
+undefined
+undefined
+undefined
+undefined
+>>> 229: å
+undefined
+undefined
+undefined
+undefined
+>>> 230: æ
+undefined
+undefined
+undefined
+undefined
+>>> 231: ç
+undefined
+undefined
+undefined
+undefined
+>>> 232: è
+undefined
+undefined
+undefined
+undefined
+>>> 233: é
+undefined
+undefined
+undefined
+undefined
+>>> 234: ê
+undefined
+undefined
+undefined
+undefined
+>>> 235: ë
+undefined
+undefined
+undefined
+undefined
+>>> 236: ì
+undefined
+undefined
+undefined
+undefined
+>>> 237: Ã
+undefined
+undefined
+undefined
+undefined
+>>> 238: î
+undefined
+undefined
+undefined
+undefined
+>>> 239: ï
+undefined
+undefined
+undefined
+undefined
+>>> 240: ð
+undefined
+undefined
+undefined
+undefined
+>>> 241: ñ
+undefined
+undefined
+undefined
+undefined
+>>> 242: ò
+undefined
+undefined
+undefined
+undefined
+>>> 243: ó
+undefined
+undefined
+undefined
+undefined
+>>> 244: ô
+undefined
+undefined
+undefined
+undefined
+>>> 245: õ
+undefined
+undefined
+undefined
+undefined
+>>> 246: ö
+undefined
+undefined
+undefined
+undefined
+>>> 247: ÷
+undefined
+undefined
+undefined
+undefined
+>>> 248: ø
+undefined
+undefined
+undefined
+undefined
+>>> 249: ù
+undefined
+undefined
+undefined
+undefined
+>>> 250: ú
+undefined
+undefined
+undefined
+undefined
+>>> 251: û
+undefined
+undefined
+undefined
+undefined
+>>> 252: ü
+undefined
+undefined
+undefined
+undefined
+>>> 253: ý
+undefined
+undefined
+undefined
+undefined
+>>> 254: þ
+undefined
+undefined
+undefined
+undefined
+>>> 255: ÿ
+undefined
+undefined
+undefined
+undefined
+>>> 256: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 257: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 258: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 259: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 260: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 261: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 262: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 263: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 264: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 265: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 266: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 267: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 268: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 269: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 270: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 271: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 272: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 273: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 274: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 275: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 276: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 277: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 278: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 279: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 280: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 281: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 282: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 283: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 284: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 285: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 286: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 287: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 288: Ä
+undefined
+undefined
+undefined
+undefined
+>>> 289: Ä¡
+undefined
+undefined
+undefined
+undefined
+>>> 290: Ģ
+undefined
+undefined
+undefined
+undefined
+>>> 291: ģ
+undefined
+undefined
+undefined
+undefined
+>>> 292: Ĥ
+undefined
+undefined
+undefined
+undefined
+>>> 293: ĥ
+undefined
+undefined
+undefined
+undefined
+>>> 294: Ħ
+undefined
+undefined
+undefined
+undefined
+>>> 295: ħ
+undefined
+undefined
+undefined
+undefined
+>>> 296: Ĩ
+undefined
+undefined
+undefined
+undefined
+>>> 297: Ä©
+undefined
+undefined
+undefined
+undefined
+>>> 298: Ī
+undefined
+undefined
+undefined
+undefined
+>>> 299: Ä«
+undefined
+undefined
+undefined
+undefined
+>>> 300:
+undefined
+undefined
+undefined
+undefined
+>>> 301: ""
+undefined
+undefined
+undefined
+undefined
+>>> 302: "
+undefined
+undefined
+undefined
+undefined
+>>> 303: '
+undefined
+undefined
+undefined
+undefined
+>>> 304:
+undefined
+undefined
+undefined
+undefined
+>>> 305: &
+undefined
+undefined
+undefined
+undefined
+>>> 306: &hi;
+undefined
+undefined
+undefined
+undefined
+>>> 307: &
+undefined
+undefined
+undefined
+undefined
+>>> 308: _root
+undefined
+undefined
+undefined
+undefined
+>>> 309: _level0
+undefined
+undefined
+undefined
+undefined
+>>> no args
+undefined
+undefined
+undefined
diff --git a/test/trace/externalinterface-escape-8.swf b/test/trace/externalinterface-escape-8.swf
new file mode 100644
index 0000000..c172a2d
Binary files /dev/null and b/test/trace/externalinterface-escape-8.swf differ
diff --git a/test/trace/externalinterface-escape-8.swf.trace b/test/trace/externalinterface-escape-8.swf.trace
new file mode 100644
index 0000000..393a25f
--- /dev/null
+++ b/test/trace/externalinterface-escape-8.swf.trace
@@ -0,0 +1,1558 @@
+>>> 0:
+null
+null
+null
+null
+>>> 1:
+
+
+
+
+>>> 2:
+
+
+
+
+>>> 3:
+
+
+
+
+>>> 4:
+
+
+
+
+>>> 5:
+
+
+
+
+>>> 6:
+
+
+
+
+>>> 7:
+
+
+
+
+>>> 8:
+
+
+
+
+>>> 9:
+
+
+
+
+>>> 10:
+
+\n
+
+
+
+
+
+
+>>> 11:
+
+
+
+
+>>> 12:
+
+
+
+
+>>> 13:
+\r
+
+
+
+>>> 14:
+
+
+
+
+>>> 15:
+
+
+
+
+>>> 16:
+
+
+
+
+>>> 17:
+
+
+
+
+>>> 18:
+
+
+
+
+>>> 19:
+
+
+
+
+>>> 20:
+
+
+
+
+>>> 21:
+
+
+
+
+>>> 22:
+
+
+
+
+>>> 23:
+
+
+
+
+>>> 24:
+
+
+
+
+>>> 25:
+
+
+
+
+>>> 26:
+
+
+
+
+>>> 27:
+
+
+
+
+>>> 28:
+
+
+
+
+>>> 29:
+
+
+
+
+>>> 30:
+
+
+
+
+>>> 31:
+
+
+
+
+>>> 32:
+
+
+
+
+>>> 33: !
+!
+!
+!
+!
+>>> 34: "
+\"
+"
+"
+"
+>>> 35: #
+#
+#
+#
+#
+>>> 36: $
+$
+$
+$
+$
+>>> 37: %
+%
+%
+%
+%
+>>> 38: &
+&
+&
+&
+&
+>>> 39: '
+'
+'
+'
+'
+>>> 40: (
+(
+(
+(
+(
+>>> 41: )
+)
+)
+)
+)
+>>> 42: *
+*
+*
+*
+*
+>>> 43: +
++
++
++
++
+>>> 44: ,
+,
+,
+,
+,
+>>> 45: -
+-
+-
+-
+-
+>>> 46: .
+.
+.
+.
+.
+>>> 47: /
+/
+/
+/
+/
+>>> 48: 0
+0
+0
+0
+0
+>>> 49: 1
+1
+1
+1
+1
+>>> 50: 2
+2
+2
+2
+2
+>>> 51: 3
+3
+3
+3
+3
+>>> 52: 4
+4
+4
+4
+4
+>>> 53: 5
+5
+5
+5
+5
+>>> 54: 6
+6
+6
+6
+6
+>>> 55: 7
+7
+7
+7
+7
+>>> 56: 8
+8
+8
+8
+8
+>>> 57: 9
+9
+9
+9
+9
+>>> 58: :
+:
+:
+:
+:
+>>> 59: ;
+;
+;
+;
+;
+>>> 60: <
+<
+<
+<
+<
+>>> 61: =
+=
+=
+=
+=
+>>> 62: >
+>
+>
+>
+>
+>>> 63: ?
+?
+?
+?
+?
+>>> 64: @
+@
+@
+@
+@
+>>> 65: A
+A
+A
+A
+A
+>>> 66: B
+B
+B
+B
+B
+>>> 67: C
+C
+C
+C
+C
+>>> 68: D
+D
+D
+D
+D
+>>> 69: E
+E
+E
+E
+E
+>>> 70: F
+F
+F
+F
+F
+>>> 71: G
+G
+G
+G
+G
+>>> 72: H
+H
+H
+H
+H
+>>> 73: I
+I
+I
+I
+I
+>>> 74: J
+J
+J
+J
+J
+>>> 75: K
+K
+K
+K
+K
+>>> 76: L
+L
+L
+L
+L
+>>> 77: M
+M
+M
+M
+M
+>>> 78: N
+N
+N
+N
+N
+>>> 79: O
+O
+O
+O
+O
+>>> 80: P
+P
+P
+P
+P
+>>> 81: Q
+Q
+Q
+Q
+Q
+>>> 82: R
+R
+R
+R
+R
+>>> 83: S
+S
+S
+S
+S
+>>> 84: T
+T
+T
+T
+T
+>>> 85: U
+U
+U
+U
+U
+>>> 86: V
+V
+V
+V
+V
+>>> 87: W
+W
+W
+W
+W
+>>> 88: X
+X
+X
+X
+X
+>>> 89: Y
+Y
+Y
+Y
+Y
+>>> 90: Z
+Z
+Z
+Z
+Z
+>>> 91: [
+[
+[
+[
+[
+>>> 92: \
+\
+\
+\
+\
+>>> 93: ]
+]
+]
+]
+]
+>>> 94: ^
+^
+^
+^
+^
+>>> 95: _
+_
+_
+_
+_
+>>> 96: `
+`
+`
+`
+`
+>>> 97: a
+a
+a
+a
+a
+>>> 98: b
+b
+b
+b
+b
+>>> 99: c
+c
+c
+c
+c
+>>> 100: d
+d
+d
+d
+d
+>>> 101: e
+e
+e
+e
+e
+>>> 102: f
+f
+f
+f
+f
+>>> 103: g
+g
+g
+g
+g
+>>> 104: h
+h
+h
+h
+h
+>>> 105: i
+i
+i
+i
+i
+>>> 106: j
+j
+j
+j
+j
+>>> 107: k
+k
+k
+k
+k
+>>> 108: l
+l
+l
+l
+l
+>>> 109: m
+m
+m
+m
+m
+>>> 110: n
+n
+n
+n
+n
+>>> 111: o
+o
+o
+o
+o
+>>> 112: p
+p
+p
+p
+p
+>>> 113: q
+q
+q
+q
+q
+>>> 114: r
+r
+r
+r
+r
+>>> 115: s
+s
+s
+s
+s
+>>> 116: t
+t
+t
+t
+t
+>>> 117: u
+u
+u
+u
+u
+>>> 118: v
+v
+v
+v
+v
+>>> 119: w
+w
+w
+w
+w
+>>> 120: x
+x
+x
+x
+x
+>>> 121: y
+y
+y
+y
+y
+>>> 122: z
+z
+z
+z
+z
+>>> 123: {
+{
+{
+{
+{
+>>> 124: |
+|
+|
+|
+|
+>>> 125: }
+}
+}
+}
+}
+>>> 126: ~
+~
+~
+~
+~
+>>> 127:
+
+
+
+
+>>> 128: Â
+Â
+Â
+Â
+Â
+>>> 129: Â
+Â
+Â
+Â
+Â
+>>> 130: Â
+Â
+Â
+Â
+Â
+>>> 131: Â
+Â
+Â
+Â
+Â
+>>> 132: Â
+Â
+Â
+Â
+Â
+>>> 133: Â
+Â
+Â
+Â
+Â
+>>> 134: Â
+Â
+Â
+Â
+Â
+>>> 135: Â
+Â
+Â
+Â
+Â
+>>> 136: Â
+Â
+Â
+Â
+Â
+>>> 137: Â
+Â
+Â
+Â
+Â
+>>> 138: Â
+Â
+Â
+Â
+Â
+>>> 139: Â
+Â
+Â
+Â
+Â
+>>> 140: Â
+Â
+Â
+Â
+Â
+>>> 141: Â
+Â
+Â
+Â
+Â
+>>> 142: Â
+Â
+Â
+Â
+Â
+>>> 143: Â
+Â
+Â
+Â
+Â
+>>> 144: Â
+Â
+Â
+Â
+Â
+>>> 145: Â
+Â
+Â
+Â
+Â
+>>> 146: Â
+Â
+Â
+Â
+Â
+>>> 147: Â
+Â
+Â
+Â
+Â
+>>> 148: Â
+Â
+Â
+Â
+Â
+>>> 149: Â
+Â
+Â
+Â
+Â
+>>> 150: Â
+Â
+Â
+Â
+Â
+>>> 151: Â
+Â
+Â
+Â
+Â
+>>> 152: Â
+Â
+Â
+Â
+Â
+>>> 153: Â
+Â
+Â
+Â
+Â
+>>> 154: Â
+Â
+Â
+Â
+Â
+>>> 155: Â
+Â
+Â
+Â
+Â
+>>> 156: Â
+Â
+Â
+Â
+Â
+>>> 157: Â
+Â
+Â
+Â
+Â
+>>> 158: Â
+Â
+Â
+Â
+Â
+>>> 159: Â
+Â
+Â
+Â
+Â
+>>> 160: Â
+Â
+Â
+Â
+Â
+>>> 161: ¡
+¡
+¡
+¡
+¡
+>>> 162: ¢
+¢
+¢
+¢
+¢
+>>> 163: £
+£
+£
+£
+£
+>>> 164: ¤
+¤
+¤
+¤
+¤
+>>> 165: ¥
+Â¥
+Â¥
+Â¥
+Â¥
+>>> 166: ¦
+¦
+¦
+¦
+¦
+>>> 167: §
+§
+§
+§
+§
+>>> 168: ¨
+¨
+¨
+¨
+¨
+>>> 169: ©
+©
+©
+©
+©
+>>> 170: ª
+ª
+ª
+ª
+ª
+>>> 171: «
+«
+«
+«
+«
+>>> 172: ¬
+¬
+¬
+¬
+¬
+>>> 173: Â
+Â
+Â
+Â
+Â
+>>> 174: ®
+®
+®
+®
+®
+>>> 175: ¯
+¯
+¯
+¯
+¯
+>>> 176: °
+°
+°
+°
+°
+>>> 177: ±
+±
+±
+±
+±
+>>> 178: ²
+²
+²
+²
+²
+>>> 179: ³
+³
+³
+³
+³
+>>> 180: ´
+´
+´
+´
+´
+>>> 181: µ
+µ
+µ
+µ
+µ
+>>> 182: ¶
+¶
+¶
+¶
+¶
+>>> 183: ·
+·
+·
+·
+·
+>>> 184: ¸
+¸
+¸
+¸
+¸
+>>> 185: ¹
+¹
+¹
+¹
+¹
+>>> 186: º
+º
+º
+º
+º
+>>> 187: »
+»
+»
+»
+»
+>>> 188: ¼
+¼
+¼
+¼
+¼
+>>> 189: ½
+½
+½
+½
+½
+>>> 190: ¾
+¾
+¾
+¾
+¾
+>>> 191: ¿
+¿
+¿
+¿
+¿
+>>> 192: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 193: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 194: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 195: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 196: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 197: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 198: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 199: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 200: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 201: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 202: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 203: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 204: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 205: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 206: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 207: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 208: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 209: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 210: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 211: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 212: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 213: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 214: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 215: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 216: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 217: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 218: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 219: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 220: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 221: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 222: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 223: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 224: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 225: á
+á
+á
+á
+á
+>>> 226: â
+â
+â
+â
+â
+>>> 227: ã
+ã
+ã
+ã
+ã
+>>> 228: ä
+ä
+ä
+ä
+ä
+>>> 229: å
+Ã¥
+Ã¥
+Ã¥
+Ã¥
+>>> 230: æ
+æ
+æ
+æ
+æ
+>>> 231: ç
+ç
+ç
+ç
+ç
+>>> 232: è
+è
+è
+è
+è
+>>> 233: é
+é
+é
+é
+é
+>>> 234: ê
+ê
+ê
+ê
+ê
+>>> 235: ë
+ë
+ë
+ë
+ë
+>>> 236: ì
+ì
+ì
+ì
+ì
+>>> 237: Ã
+Ã
+Ã
+Ã
+Ã
+>>> 238: î
+î
+î
+î
+î
+>>> 239: ï
+ï
+ï
+ï
+ï
+>>> 240: ð
+ð
+ð
+ð
+ð
+>>> 241: ñ
+ñ
+ñ
+ñ
+ñ
+>>> 242: ò
+ò
+ò
+ò
+ò
+>>> 243: ó
+ó
+ó
+ó
+ó
+>>> 244: ô
+ô
+ô
+ô
+ô
+>>> 245: õ
+õ
+õ
+õ
+õ
+>>> 246: ö
+ö
+ö
+ö
+ö
+>>> 247: ÷
+÷
+÷
+÷
+÷
+>>> 248: ø
+ø
+ø
+ø
+ø
+>>> 249: ù
+ù
+ù
+ù
+ù
+>>> 250: ú
+ú
+ú
+ú
+ú
+>>> 251: û
+û
+û
+û
+û
+>>> 252: ü
+ü
+ü
+ü
+ü
+>>> 253: ý
+ý
+ý
+ý
+ý
+>>> 254: þ
+þ
+þ
+þ
+þ
+>>> 255: ÿ
+ÿ
+ÿ
+ÿ
+ÿ
+>>> 256: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 257: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 258: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 259: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 260: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 261: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 262: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 263: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 264: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 265: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 266: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 267: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 268: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 269: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 270: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 271: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 272: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 273: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 274: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 275: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 276: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 277: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 278: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 279: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 280: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 281: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 282: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 283: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 284: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 285: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 286: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 287: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 288: Ä
+Ä
+Ä
+Ä
+Ä
+>>> 289: Ä¡
+Ä¡
+Ä¡
+Ä¡
+Ä¡
+>>> 290: Ģ
+Ä¢
+Ä¢
+Ä¢
+Ä¢
+>>> 291: ģ
+Ä£
+Ä£
+Ä£
+Ä£
+>>> 292: Ĥ
+Ĥ
+Ĥ
+Ĥ
+Ĥ
+>>> 293: ĥ
+Ä¥
+Ä¥
+Ä¥
+Ä¥
+>>> 294: Ħ
+Ħ
+Ħ
+Ħ
+Ħ
+>>> 295: ħ
+ħ
+ħ
+ħ
+ħ
+>>> 296: Ĩ
+Ĩ
+Ĩ
+Ĩ
+Ĩ
+>>> 297: Ä©
+Ä©
+Ä©
+Ä©
+Ä©
+>>> 298: Ī
+Ī
+Ī
+Ī
+Ī
+>>> 299: Ä«
+Ä«
+Ä«
+Ä«
+Ä«
+>>> 300:
+null
+null
+null
+null
+>>> 301: ""
+\"\"
+""
+""
+""
+>>> 302: "
+\"
+"
+"
+"
+>>> 303: '
+'
+'
+'
+'
+>>> 304:
+
+&nbsp;
+
+
+>>> 305: &
+&
+&amp;
+&
+&
+>>> 306: &hi;
+&hi;
+&hi;
+&hi;
+&hi;
+>>> 307: &
+&
+&
+&
+&
+>>> 308: _root
+_root
+_root
+_root
+_root
+>>> 309: _level0
+_level0
+_level0
+_level0
+_level0
+>>> no args
+null
+null
+null
diff --git a/test/trace/externalinterface-escape.as b/test/trace/externalinterface-escape.as
new file mode 100644
index 0000000..def51c9
--- /dev/null
+++ b/test/trace/externalinterface-escape.as
@@ -0,0 +1,25 @@
+// makeswf -v 7 -s 200x150 -r 1 -o externalinterface-escape.swf externalinterface-escape.as
+
+strings = [];
+for (i = 0; i < 300; i++) {
+ strings.push (String.fromCharCode (i));
+}
+strings = strings.concat ([ "", "\"\"", "\"", "'",
+ " ", "&", "&hi;", "&",
+ "_root", "_level0"
+]);
+
+for (i = 0; i < strings.length; i++) {
+ trace (">>> " + i + ": " + strings[i]);
+ trace (flash.external.ExternalInterface._jsQuoteString (strings[i]));
+ t = flash.external.ExternalInterface._escapeXML (strings[i]);
+ trace (t);
+ trace (flash.external.ExternalInterface._unescapeXML (t));
+ trace (flash.external.ExternalInterface._unescapeXML (strings[i]));
+}
+trace (">>> no args");
+trace (flash.external.ExternalInterface._jsQuoteString ());
+trace (flash.external.ExternalInterface._escapeXML ());
+trace (flash.external.ExternalInterface._unescapeXML ());
+
+loadMovie ("fscommand:quit", "");
commit a928f0f061f44fb0eea0cd55969c9ba4c629e86c
Author: Benjamin Otte <otte at gnome.org>
Date: Fri Dec 21 14:11:54 2007 +0100
initial stubs for ExternalInterface
The SwfdecPlayer class got a new sparkling "scipting" property of type
SwfdecPlayerScripting which is a GObject that is public and the user is supposed
to implement it if he wants to implement ExternalInterface.
By default this is set to NULL which means ExternalInterface is not available.
Also implement the _escapeXML, _unescapeXML and _jsQuoteString functions
diff --git a/libswfdec/Makefile.am b/libswfdec/Makefile.am
index 471f2c6..322529c 100644
--- a/libswfdec/Makefile.am
+++ b/libswfdec/Makefile.am
@@ -110,6 +110,7 @@ libswfdec_source_files = \
swfdec_pattern.c \
swfdec_player.c \
swfdec_player_as.c \
+ swfdec_player_scripting.c \
swfdec_print_job.c \
swfdec_policy_loader.c \
swfdec_rect.c \
@@ -189,6 +190,7 @@ public_headers = \
swfdec_keys.h \
swfdec_loader.h \
swfdec_player.h \
+ swfdec_player_scripting.h \
swfdec_rectangle.h \
swfdec_script.h \
swfdec_system.h \
diff --git a/libswfdec/swfdec.h b/libswfdec/swfdec.h
index 9d13242..1a9a4ca 100644
--- a/libswfdec/swfdec.h
+++ b/libswfdec/swfdec.h
@@ -38,6 +38,7 @@
#include <libswfdec/swfdec_keys.h>
#include <libswfdec/swfdec_loader.h>
#include <libswfdec/swfdec_player.h>
+#include <libswfdec/swfdec_player_scripting.h>
#include <libswfdec/swfdec_rectangle.h>
#include <libswfdec/swfdec_system.h>
#include <libswfdec/swfdec_url.h>
diff --git a/libswfdec/swfdec_external_interface.c b/libswfdec/swfdec_external_interface.c
index d59d143..f0d3421 100644
--- a/libswfdec/swfdec_external_interface.c
+++ b/libswfdec/swfdec_external_interface.c
@@ -21,16 +21,21 @@
#include "config.h"
#endif
+#include <string.h>
+
#include "swfdec_as_internal.h"
+#include "swfdec_as_strings.h"
#include "swfdec_debug.h"
+#include "swfdec_player_internal.h"
+#include "swfdec_player_scripting.h"
+#include "swfdec_xml.h"
-// static
SWFDEC_AS_NATIVE (14, 0, swfdec_external_interface__initJS)
void
swfdec_external_interface__initJS (SwfdecAsContext *cx, SwfdecAsObject *object,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
{
- SWFDEC_STUB ("ExternalInterface._initJS (static)");
+ /* FIXME: call an init vfunc here? */
}
SWFDEC_AS_NATIVE (14, 1, swfdec_external_interface__objectID)
@@ -39,7 +44,21 @@ swfdec_external_interface__objectID (SwfdecAsContext *cx,
SwfdecAsObject *object, guint argc, SwfdecAsValue *argv,
SwfdecAsValue *ret)
{
- SWFDEC_STUB ("ExternalInterface._objectID (static)");
+ SwfdecPlayer *player = SWFDEC_PLAYER (cx);
+ SwfdecPlayerScripting *scripting = player->priv->scripting;
+ SwfdecPlayerScriptingClass *klass;
+
+ if (scripting == NULL) {
+ SWFDEC_AS_VALUE_SET_NULL (ret);
+ return;
+ }
+ klass = SWFDEC_PLAYER_SCRIPTING_GET_CLASS (scripting);
+ if (klass->get_id) {
+ char *s = klass->get_id (scripting, player);
+ SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_give_string (cx, s));
+ } else {
+ SWFDEC_AS_VALUE_SET_STRING (ret, SWFDEC_AS_STR_EMPTY);
+ }
}
SWFDEC_AS_NATIVE (14, 2, swfdec_external_interface__addCallback)
@@ -59,13 +78,13 @@ swfdec_external_interface__evalJS (SwfdecAsContext *cx, SwfdecAsObject *object,
SWFDEC_STUB ("ExternalInterface._evalJS (static)");
}
-SWFDEC_AS_NATIVE (14, 4, swfdec_external_interface__callout)
+SWFDEC_AS_NATIVE (14, 4, swfdec_external_interface__callOut)
void
-swfdec_external_interface__callout (SwfdecAsContext *cx,
+swfdec_external_interface__callOut (SwfdecAsContext *cx,
SwfdecAsObject *object, guint argc, SwfdecAsValue *argv,
SwfdecAsValue *ret)
{
- SWFDEC_STUB ("ExternalInterface._callout (static)");
+ SWFDEC_STUB ("ExternalInterface._callOut (static)");
}
SWFDEC_AS_NATIVE (14, 5, swfdec_external_interface__escapeXML)
@@ -74,7 +93,15 @@ swfdec_external_interface__escapeXML (SwfdecAsContext *cx,
SwfdecAsObject *object, guint argc, SwfdecAsValue *argv,
SwfdecAsValue *ret)
{
- SWFDEC_STUB ("ExternalInterface._escapeXML (static)");
+ const char *s;
+
+ if (argc == 0 ||
+ (s = swfdec_as_value_to_string (cx, &argv[0])) == SWFDEC_AS_STR_EMPTY) {
+ SWFDEC_AS_VALUE_SET_NULL (ret);
+ return;
+ }
+
+ SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_give_string (cx, swfdec_xml_escape (s)));
}
SWFDEC_AS_NATIVE (14, 6, swfdec_external_interface__unescapeXML)
@@ -83,7 +110,16 @@ swfdec_external_interface__unescapeXML (SwfdecAsContext *cx,
SwfdecAsObject *object, guint argc, SwfdecAsValue *argv,
SwfdecAsValue *ret)
{
- SWFDEC_STUB ("ExternalInterface._unescapeXML (static)");
+ const char *s;
+
+ if (argc == 0 ||
+ (s = swfdec_as_value_to_string (cx, &argv[0])) == SWFDEC_AS_STR_EMPTY) {
+ SWFDEC_AS_VALUE_SET_NULL (ret);
+ return;
+ }
+
+ SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_give_string (cx,
+ swfdec_xml_unescape_len (cx, s, strlen (s), FALSE)));
}
SWFDEC_AS_NATIVE (14, 7, swfdec_external_interface__jsQuoteString)
@@ -92,17 +128,51 @@ swfdec_external_interface__jsQuoteString (SwfdecAsContext *cx,
SwfdecAsObject *object, guint argc, SwfdecAsValue *argv,
SwfdecAsValue *ret)
{
- SWFDEC_STUB ("ExternalInterface._jsQuoteString (static)");
+ const char *s;
+ GString *str;
+ size_t len;
+
+ if (argc == 0 ||
+ (s = swfdec_as_value_to_string (cx, &argv[0])) == SWFDEC_AS_STR_EMPTY) {
+ SWFDEC_AS_VALUE_SET_NULL (ret);
+ return;
+ }
+
+ str = g_string_new ("");
+ do {
+ /* Yay, we don't escape backslashes! */
+ len = strcspn (s, "\n\r\"");
+ g_string_append_len (str, s, len);
+ s += len;
+ if (*s == '\0')
+ break;
+ g_string_append_c (str, '\\');
+ switch (*s) {
+ case '\n':
+ g_string_append_c (str, 'n');
+ break;
+ case '\r':
+ g_string_append_c (str, 'r');
+ break;
+ case '"':
+ g_string_append_c (str, '"');
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ };
+ s++;
+ } while (TRUE);
+ SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_give_string (cx, g_string_free (str, FALSE)));
}
-// properties
SWFDEC_AS_NATIVE (14, 100, swfdec_external_interface_get_available)
void
swfdec_external_interface_get_available (SwfdecAsContext *cx,
SwfdecAsObject *object, guint argc, SwfdecAsValue *argv,
SwfdecAsValue *ret)
{
- SWFDEC_STUB ("ExternalInterface.available (static, get)");
+ SWFDEC_AS_VALUE_SET_BOOLEAN (ret, SWFDEC_PLAYER (cx)->priv->scripting != NULL);
}
SWFDEC_AS_NATIVE (14, 101, swfdec_external_interface_set_available)
@@ -111,5 +181,5 @@ swfdec_external_interface_set_available (SwfdecAsContext *cx,
SwfdecAsObject *object, guint argc, SwfdecAsValue *argv,
SwfdecAsValue *ret)
{
- SWFDEC_STUB ("ExternalInterface.available (static, set)");
+ /* read-only property */
}
diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c
index 8191f6a..297de8a 100644
--- a/libswfdec/swfdec_player.c
+++ b/libswfdec/swfdec_player.c
@@ -619,6 +619,7 @@ enum {
PROP_HEIGHT,
PROP_ALIGNMENT,
PROP_SCALE,
+ PROP_SCRIPTING,
PROP_SYSTEM,
PROP_MAX_RUNTIME
};
@@ -725,6 +726,9 @@ swfdec_player_get_property (GObject *object, guint param_id, GValue *value,
case PROP_SCALE:
g_value_set_enum (value, priv->scale_mode);
break;
+ case PROP_SCRIPTING:
+ g_value_set_object (value, priv->scripting);
+ break;
case PROP_SYSTEM:
g_value_set_object (value, priv->system);
break;
@@ -834,6 +838,9 @@ swfdec_player_set_property (GObject *object, guint param_id, const GValue *value
case PROP_SCALE:
swfdec_player_set_scale_mode (player, g_value_get_enum (value));
break;
+ case PROP_SCRIPTING:
+ swfdec_player_set_scripting (player, g_value_get_object (value));
+ break;
case PROP_SYSTEM:
g_object_unref (priv->system);
if (g_value_get_object (value)) {
@@ -1593,6 +1600,9 @@ swfdec_player_class_init (SwfdecPlayerClass *klass)
g_object_class_install_property (object_class, PROP_SCALE,
g_param_spec_enum ("scale-mode", "scale mode", "method used to scale the movie",
SWFDEC_TYPE_SCALE_MODE, SWFDEC_SCALE_SHOW_ALL, G_PARAM_READWRITE));
+ g_object_class_install_property (object_class, PROP_SCRIPTING,
+ g_param_spec_object ("scripting", "scripting", "external scripting implementation",
+ SWFDEC_TYPE_PLAYER_SCRIPTING, G_PARAM_READWRITE));
g_object_class_install_property (object_class, PROP_SCALE,
g_param_spec_object ("system", "system", "object holding system information",
SWFDEC_TYPE_SYSTEM, G_PARAM_READWRITE));
@@ -2832,3 +2842,46 @@ swfdec_player_set_maximum_runtime (SwfdecPlayer *player, gulong msecs)
g_object_notify (G_OBJECT (player), "max-runtime");
}
+/**
+ * swfdec_player_get_scripting:
+ * @player: a #SwfdecPlayer
+ *
+ * Gets the current scripting implementation in use. If no implementation is in
+ * use (the default), %NULL is returned.
+ *
+ * Returns: the current scripting implementation used or %NULL if none
+ **/
+SwfdecPlayerScripting *
+swfdec_player_get_scripting (SwfdecPlayer *player)
+{
+ g_return_val_if_fail (SWFDEC_IS_PLAYER (player), NULL);
+
+ return player->priv->scripting;
+}
+
+/**
+ * swfdec_player_set_scripting:
+ * @player: a #SwfdecPlayer
+ * @scripting: the scripting implementation to use or %NULL to disable scripting
+ *
+ * Sets the implementation to use for external scripting in the given @player.
+ * Note that this is different from the internal script engine. See the
+ * #SwfdecPlayerScripting paragraph for details about external scripting.
+ **/
+void
+swfdec_player_set_scripting (SwfdecPlayer *player, SwfdecPlayerScripting *scripting)
+{
+ SwfdecPlayerPrivate *priv;
+
+ g_return_if_fail (SWFDEC_IS_PLAYER (player));
+ g_return_if_fail (scripting == NULL || SWFDEC_IS_PLAYER_SCRIPTING (scripting));
+
+ priv = player->priv;
+ if (priv->scripting == scripting)
+ return;
+
+ if (priv->scripting)
+ g_object_unref (priv->scripting);
+ priv->scripting = g_object_ref (scripting);
+ g_object_notify (G_OBJECT (player), "scripting");
+}
diff --git a/libswfdec/swfdec_player.h b/libswfdec/swfdec_player.h
index 16ec52d..2dd1f27 100644
--- a/libswfdec/swfdec_player.h
+++ b/libswfdec/swfdec_player.h
@@ -54,6 +54,9 @@ typedef enum {
SWFDEC_SCALE_NONE
} SwfdecScaleMode;
+/* forward declarations */
+typedef struct _SwfdecPlayerScripting SwfdecPlayerScripting;
+
typedef struct _SwfdecPlayer SwfdecPlayer;
typedef struct _SwfdecPlayerPrivate SwfdecPlayerPrivate;
typedef struct _SwfdecPlayerClass SwfdecPlayerClass;
@@ -129,6 +132,10 @@ gulong swfdec_player_get_maximum_runtime
void swfdec_player_set_maximum_runtime
(SwfdecPlayer * player,
gulong msecs);
+SwfdecPlayerScripting *
+ swfdec_player_get_scripting (SwfdecPlayer * player);
+void swfdec_player_set_scripting (SwfdecPlayer * player,
+ SwfdecPlayerScripting *scripting);
void swfdec_player_render (SwfdecPlayer * player,
cairo_t * cr,
diff --git a/libswfdec/swfdec_player_internal.h b/libswfdec/swfdec_player_internal.h
index 07d3fa8..f8c6119 100644
--- a/libswfdec/swfdec_player_internal.h
+++ b/libswfdec/swfdec_player_internal.h
@@ -23,6 +23,7 @@
#include <libswfdec/swfdec_player.h>
#include <libswfdec/swfdec_audio.h>
#include <libswfdec/swfdec_event.h>
+#include <libswfdec/swfdec_player_scripting.h>
#include <libswfdec/swfdec_rect.h>
#include <libswfdec/swfdec_ringbuffer.h>
#include <libswfdec/swfdec_security.h>
@@ -66,6 +67,7 @@ struct _SwfdecPlayerPrivate
gboolean bgcolor_set; /* TRUE if the background color has been set */
SwfdecColor bgcolor; /* background color */
SwfdecResource * resource; /* initial resource loaded */
+ SwfdecPlayerScripting *scripting; /* scripting object */
/* stage properties */
guint internal_width; /* width used by the scripting engine */
guint internal_height; /* height used by the scripting engine */
diff --git a/libswfdec/swfdec_player_scripting.c b/libswfdec/swfdec_player_scripting.c
new file mode 100644
index 0000000..0063a62
--- /dev/null
+++ b/libswfdec/swfdec_player_scripting.c
@@ -0,0 +1,39 @@
+/* Swfdec
+ * Copyright (C) 2007 Benjamin Otte <otte at gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "swfdec_player_scripting.h"
+#include "swfdec_debug.h"
+
+
+G_DEFINE_ABSTRACT_TYPE (SwfdecPlayerScripting, swfdec_player_scripting, G_TYPE_OBJECT)
+
+static void
+swfdec_player_scripting_class_init (SwfdecPlayerScriptingClass *klass)
+{
+}
+
+static void
+swfdec_player_scripting_init (SwfdecPlayerScripting *player_scripting)
+{
+}
+
diff --git a/libswfdec/swfdec_player_scripting.h b/libswfdec/swfdec_player_scripting.h
new file mode 100644
index 0000000..4b6d9fc
--- /dev/null
+++ b/libswfdec/swfdec_player_scripting.h
@@ -0,0 +1,62 @@
+/* Swfdec
+ * Copyright (C) 2007 Benjamin Otte <otte at gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ */
+
+#ifndef _SWFDEC_PLAYER_SCRIPTING_H_
+#define _SWFDEC_PLAYER_SCRIPTING_H_
+
+#include <glib-object.h>
+#include <libswfdec/swfdec_player.h>
+
+G_BEGIN_DECLS
+
+/* forward-declared in swfdec-player.h */
+/* typedef struct _SwfdecPlayerScripting SwfdecPlayerScripting; */
+typedef struct _SwfdecPlayerScriptingClass SwfdecPlayerScriptingClass;
+
+#define SWFDEC_TYPE_PLAYER_SCRIPTING (swfdec_player_scripting_get_type())
+#define SWFDEC_IS_PLAYER_SCRIPTING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_PLAYER_SCRIPTING))
+#define SWFDEC_IS_PLAYER_SCRIPTING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_PLAYER_SCRIPTING))
+#define SWFDEC_PLAYER_SCRIPTING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_PLAYER_SCRIPTING, SwfdecPlayerScripting))
+#define SWFDEC_PLAYER_SCRIPTING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_PLAYER_SCRIPTING, SwfdecPlayerScriptingClass))
+#define SWFDEC_PLAYER_SCRIPTING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_PLAYER_SCRIPTING, SwfdecPlayerScriptingClass))
+
+struct _SwfdecPlayerScripting
+{
+ GObject object;
+};
+
+struct _SwfdecPlayerScriptingClass
+{
+ GObjectClass object_class;
+
+ char * (* get_id) (SwfdecPlayerScripting *scripting,
+ SwfdecPlayer * player);
+ char * (* call_js) (SwfdecPlayerScripting *scripting,
+ SwfdecPlayer * player,
+ const char * code);
+ char * (* call_xml) (SwfdecPlayerScripting *scripting,
+ SwfdecPlayer * player,
+ const char * xml);
+};
+
+GType swfdec_player_scripting_get_type (void);
+
+
+G_END_DECLS
+#endif
commit 701c1678c541e2cb18c6161cc13c1ab1ba71121c
Author: Benjamin Otte <otte at gnome.org>
Date: Fri Dec 21 14:04:31 2007 +0100
add a boolean unescape_nbsp flag to swfdec_xml_unescape_len
ExternalInterface._unescapeXML does not unescape and I wasn't stupid
enough to write my own function (Hi Jeff!)
diff --git a/libswfdec/swfdec_text_field_movie_html.c b/libswfdec/swfdec_text_field_movie_html.c
index d3907ff..0fc6897 100644
--- a/libswfdec/swfdec_text_field_movie_html.c
+++ b/libswfdec/swfdec_text_field_movie_html.c
@@ -428,7 +428,7 @@ swfdec_text_field_movie_html_parse_text (ParserData *data, const char *p)
end = strchr (p, '\0');
}
- unescaped = swfdec_xml_unescape_len (data->cx, p, end - p);
+ unescaped = swfdec_xml_unescape_len (data->cx, p, end - p, TRUE);
data->text = g_string_append (data->text, unescaped);
g_free (unescaped);
diff --git a/libswfdec/swfdec_xml.c b/libswfdec/swfdec_xml.c
index cbecf86..70b3924 100644
--- a/libswfdec/swfdec_xml.c
+++ b/libswfdec/swfdec_xml.c
@@ -118,7 +118,7 @@ swfdec_xml_escape (const char *orginal)
char *
swfdec_xml_unescape_len (SwfdecAsContext *cx, const char *orginal,
- gssize length)
+ gssize length, gboolean unescape_nbsp)
{
int i;
const char *p, *start;
@@ -134,8 +134,12 @@ swfdec_xml_unescape_len (SwfdecAsContext *cx, const char *orginal,
if (!g_ascii_strncasecmp (p, xml_entities[i].escaped,
strlen (xml_entities[i].escaped))) {
// FIXME: Do this cleaner
- if (xml_entities[i].character == '\xa0')
- string = g_string_append_c (string, '\xc2');
+ if (xml_entities[i].character == '\xa0') {
+ if (unescape_nbsp)
+ string = g_string_append_c (string, '\xc2');
+ else
+ continue;
+ }
string = g_string_append_c (string, xml_entities[i].character);
p += strlen (xml_entities[i].escaped);
break;
@@ -156,7 +160,7 @@ swfdec_xml_unescape_len (SwfdecAsContext *cx, const char *orginal,
char *
swfdec_xml_unescape (SwfdecAsContext *cx, const char *orginal)
{
- return swfdec_xml_unescape_len (cx, orginal, strlen (orginal));
+ return swfdec_xml_unescape_len (cx, orginal, strlen (orginal), TRUE);
}
// this is never declared, only available as ASnative (100, 5)
@@ -502,7 +506,7 @@ swfdec_xml_parse_attribute (SwfdecXml *xml, SwfdecXmlNode *node, const char *p)
}
unescaped = swfdec_xml_unescape_len (SWFDEC_AS_OBJECT (xml)->context, p + 1,
- end - (p + 1));
+ end - (p + 1), TRUE);
value = swfdec_as_context_give_string (SWFDEC_AS_OBJECT (node)->context,
unescaped);
SWFDEC_AS_VALUE_SET_STRING (&val, value);
diff --git a/libswfdec/swfdec_xml.h b/libswfdec/swfdec_xml.h
index f8b094d..6d5235f 100644
--- a/libswfdec/swfdec_xml.h
+++ b/libswfdec/swfdec_xml.h
@@ -76,7 +76,8 @@ char * swfdec_xml_unescape (SwfdecAsContext * cx,
const char * orginal);
char * swfdec_xml_unescape_len (SwfdecAsContext * cx,
const char * orginal,
- gssize length);
+ gssize length,
+ gboolean unescape_nbsp);
SwfdecXml * swfdec_xml_new (SwfdecAsContext * context,
const char * str,
commit 3dcc41ba52cf94ecc747c16ce5bf73c5f4d0ad53
Author: Benjamin Otte <otte at gnome.org>
Date: Fri Dec 21 11:00:00 2007 +0100
no need to include string.h here
diff --git a/libswfdec/swfdec_character.c b/libswfdec/swfdec_character.c
index b31b3cf..db1aff5 100644
--- a/libswfdec/swfdec_character.c
+++ b/libswfdec/swfdec_character.c
@@ -23,7 +23,6 @@
#include "config.h"
#endif
-#include <string.h>
#include "swfdec_character.h"
#include "swfdec_debug.h"
#include "swfdec_decoder.h"
More information about the Swfdec
mailing list