Add automated tests on function-type FSCommand parameter passing.
[gnash.git] / testsuite / misc-ming.all / matrix_test.c
blobdc6cd9fdf8c4e6f7b9dc7e58c0cc9002b1b318de
1 /*
2 * Copyright (C) 2007, 2009, 2010, 2011, 2017 Free Software Foundation, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
20 * Sandro Santilli, strk@keybit.net
22 * Test extracting _width, _height, _xscale, _yscale, _x, _y and _rotation
23 * from hard-coded matrices.
25 * run as ./matrix_test
28 #include "ming_utils.h"
30 #include <stdlib.h>
31 #include <stdio.h>
32 #include <ming.h>
34 #define OUTPUT_VERSION 8
35 #define OUTPUT_FILENAME "matrix_test.swf"
37 SWFDisplayItem add_static_mc(SWFMovie mo, const char* name, int depth, int x, int y, int width, int height);
39 SWFDisplayItem
40 add_static_mc(SWFMovie mo, const char* name, int depth, int x, int y, int width, int height)
42 SWFShape sh;
43 SWFMovieClip mc, mc2, mc3;
44 SWFDisplayItem it;
46 sh = make_fill_square (-(width/2), -(height/2), width, height, 255, 0, 0, 255, 0, 0);
47 mc = newSWFMovieClip();
48 SWFMovieClip_add(mc, (SWFBlock)sh);
50 sh = make_square (-(width/2)+5, -(height/2)+5, width-10, height-10, 0, 0, 0);
51 mc2 = newSWFMovieClip(); // child
52 SWFMovieClip_add(mc2, (SWFBlock)sh);
53 SWFMovieClip_nextFrame(mc2);
54 it = SWFMovieClip_add(mc, (SWFBlock)mc2);
55 SWFDisplayItem_setName(it, "child");
57 sh = make_fill_square ((width/4), -(height/8), (width/4), (height/4), 0, 255, 0, 0, 255, 0);
58 mc3 = newSWFMovieClip(); // child
59 SWFMovieClip_add(mc3, (SWFBlock)sh);
60 SWFMovieClip_nextFrame(mc3);
61 it = SWFMovieClip_add(mc, (SWFBlock)mc3);
62 SWFDisplayItem_setName(it, "face");
64 SWFMovieClip_nextFrame(mc);
66 it = SWFMovie_add(mo, (SWFBlock)mc);
67 SWFDisplayItem_setDepth(it, depth);
68 SWFDisplayItem_moveTo(it, x, y);
69 SWFDisplayItem_setName(it, name);
71 return it;
75 int
76 main(int argc, char** argv)
78 SWFMovie mo;
79 SWFMovieClip dejagnuclip;
80 SWFDisplayItem it;
82 const char *srcdir=".";
83 if ( argc>1 )
84 srcdir=argv[1];
85 else
87 //fprintf(stderr, "Usage: %s <mediadir>\n", argv[0]);
88 //return 1;
91 Ming_init();
92 mo = newSWFMovieWithVersion(OUTPUT_VERSION);
93 SWFMovie_setDimension(mo, 800, 600);
94 //SWFMovie_setRate (mo, 0.2);
95 //SWFMovie_setRate (mo, 2);
96 SWFMovie_setRate (mo, 12);
98 dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 800, 600);
99 SWFMovie_add(mo, (SWFBlock)dejagnuclip);
101 add_actions(mo,
102 "printBounds = function(b, roundToDecimal) "
103 "{ "
104 " if ( roundToDecimal != undefined ) {"
105 " var round = Math.pow(10, roundToDecimal);"
106 //" trace('rounding to '+round);"
107 " return '' + Math.round(b.xMin*round)/round + ','+ Math.round(b.yMin*round)/round + ' '+ Math.round(b.xMax*round)/round + ',' + Math.round(b.yMax*round)/round; "
108 " } else {"
109 " return '' + b.xMin + ','+ b.yMin + ' '+ b.xMax + ',' + b.yMax; "
110 " }"
111 "};"
112 "printMatrix = function(m, roundToDecimal) "
113 "{ "
114 " if ( roundToDecimal != undefined ) {"
115 " var round = Math.pow(10, roundToDecimal);"
116 //" trace('rounding to '+round);"
117 " return '(a=' + Math.round(m.a*round)/round + ', b='+ Math.round(m.b*round)/round + ', c='+ Math.round(m.c*round)/round + ', d=' + Math.round(m.d*round)/round + ', tx='+Math.round(m.tx*round)/round+', ty='+Math.round(m.ty*round)/round+')'; "
118 " } else {"
119 " return m.toString();"
120 " }"
121 "};"
122 "onMouseDown = function() {"
123 " if ( playing ) { playing=false; stop(); }"
124 " else { playing=true; play(); }"
125 "};"
128 SWFMovie_nextFrame(mo);
131 // Static 60x60 movieclip
132 it = add_static_mc(mo, "staticmc", 3, 50, 300, 60, 60);
134 // Check if we cleaned them all now
135 check_equals(mo, "typeof(staticmc)", "'movieclip'");
136 check_equals(mo, "staticmc._x", "50");
137 check_equals(mo, "staticmc._y", "300");
138 check_equals(mo, "staticmc._xscale", "100");
139 check_equals(mo, "staticmc._yscale", "100");
140 check_equals(mo, "staticmc._rotation", "0");
141 check_equals(mo, "staticmc._width", "60.1");
142 check_equals(mo, "staticmc._height", "60.1");
144 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'19.95,269.95 80.05,330.05'");
146 // X: 19.95 .. 80.05
147 // Y: 269.95 .. 330.05
149 check(mo, "staticmc.hitTest(21, 270, false)"); // top-left
150 check(mo, "staticmc.hitTest(79, 270, false)"); // top-right
151 check(mo, "staticmc.hitTest(21, 329, false)"); // bottom-left
152 check(mo, "staticmc.hitTest(79, 329, false)"); // bottom-right
154 check(mo, "!staticmc.hitTest(18, 300, false)"); // overleft
155 check(mo, "!staticmc.hitTest(82, 300, false)"); // overright
156 check(mo, "!staticmc.hitTest(50, 260, false)"); // overup
157 check(mo, "!staticmc.hitTest(50, 331, false)"); // overdown
159 SWFMovie_nextFrame(mo);
161 SWFDisplayItem_rotateTo(it, -45);
163 check_equals(mo, "staticmc._x", "50");
164 check_equals(mo, "staticmc._y", "300");
165 check_equals(mo, "Math.round(staticmc._xscale)", "100");
166 check_equals(mo, "Math.round(staticmc._yscale)", "100");
167 check_equals(mo, "staticmc._rotation", "45");
168 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
169 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'7.5,257.5 92.5,342.5'");
170 check_equals(mo, "staticmc._width", "85");
171 check_equals(mo, "staticmc._height", "85");
173 // X: 7.5 .. 92.5
174 // Y: 257.5 .. 342.5
176 check(mo, "staticmc.hitTest(8, 258, false)"); // top-left
177 check(mo, "staticmc.hitTest(90, 258, false)"); // top-right
178 check(mo, "staticmc.hitTest(8, 340, false)"); // bottom-left
179 check(mo, "staticmc.hitTest(90, 340, false)"); // bottom-right
181 check(mo, "!staticmc.hitTest(6, 300, false)"); // overleft
182 check(mo, "!staticmc.hitTest(95, 300, false)"); // overright
183 check(mo, "!staticmc.hitTest(50, 250, false)"); // overup
184 check(mo, "!staticmc.hitTest(50, 345, false)"); // overdown
187 SWFMovie_nextFrame(mo);
189 SWFDisplayItem_scaleTo(it, 2, 3);
191 check_equals(mo, "staticmc._x", "50");
192 check_equals(mo, "staticmc._y", "300");
193 check_equals(mo, "Math.round(staticmc._xscale)", "200");
194 check_equals(mo, "Math.round(staticmc._yscale)", "300");
195 check_equals(mo, "staticmc._rotation", "45");
196 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
197 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-56.25,193.75 156.25,406.25'");
198 check_equals(mo, "staticmc._width", "212.5");
199 check_equals(mo, "staticmc._height", "212.5");
201 // X: -56.25 156.25
202 // Y: 193.75 406.25
204 check(mo, "staticmc.hitTest(-56, 194, false)"); // top-left
205 check(mo, "staticmc.hitTest(156, 194, false)"); // top-right
206 check(mo, "staticmc.hitTest(-56, 406, false)"); // bottom-left
207 check(mo, "staticmc.hitTest(156, 406, false)"); // bottom-right
209 check(mo, "!staticmc.hitTest(-57, 300, false)"); // overleft
210 check(mo, "!staticmc.hitTest(157, 300, false)"); // overright
211 check(mo, "!staticmc.hitTest(50, 193, false)"); // overup
212 check(mo, "!staticmc.hitTest(50, 407, false)"); // overdown
214 SWFMovie_nextFrame(mo);
216 SWFDisplayItem_skewXTo(it, 2);
218 check_equals(mo, "staticmc._x", "50");
219 check_equals(mo, "staticmc._y", "300");
220 check_equals(mo, "Math.round(staticmc._xscale)", "447");
221 check_equals(mo, "Math.round(staticmc._yscale)", "300");
222 check_equals(mo, "Math.round(staticmc._rotation*1000)", "18435"); // 18.43469...
223 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
224 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-141.25,193.75 241.25,406.25'");
225 check_equals(mo, "staticmc._width", "382.5");
226 check_equals(mo, "staticmc._height", "212.5");
228 // X: -141.25 241.25
229 // Y: 193.75 406.25
231 check(mo, "staticmc.hitTest(-141, 194, false)"); // top-left
232 check(mo, "staticmc.hitTest(241, 194, false)"); // top-right
233 check(mo, "staticmc.hitTest(-141, 406, false)"); // bottom-left
234 check(mo, "staticmc.hitTest(241, 406, false)"); // bottom-right
236 check(mo, "!staticmc.hitTest(-142, 300, false)"); // overleft
237 check(mo, "!staticmc.hitTest(242, 300, false)"); // overright
238 check(mo, "!staticmc.hitTest(50, 193, false)"); // overup
239 check(mo, "!staticmc.hitTest(50, 407, false)"); // overdown
241 SWFMovie_nextFrame(mo);
243 SWFDisplayItem_scaleTo(it, 2, -3);
245 check_equals(mo, "staticmc._x", "50");
246 check_equals(mo, "staticmc._y", "300");
247 check_equals(mo, "Math.round(staticmc._xscale)", "447");
248 check_equals(mo, "Math.round(staticmc._yscale)", "300");
249 check_equals(mo, "Math.round(staticmc._rotation*1000)", "18435"); // 18.43469...
250 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
251 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-141.25,193.75 241.25,406.25'");
252 check_equals(mo, "staticmc._width", "382.5");
253 check_equals(mo, "staticmc._height", "212.5");
255 // X: -141.25 241.25
256 // Y: 193.75 406.25
258 check(mo, "staticmc.hitTest(-141, 194, false)"); // top-left
259 check(mo, "staticmc.hitTest(241, 194, false)"); // top-right
260 check(mo, "staticmc.hitTest(-141, 406, false)"); // bottom-left
261 check(mo, "staticmc.hitTest(241, 406, false)"); // bottom-right
263 check(mo, "!staticmc.hitTest(-142, 300, false)"); // overleft
264 check(mo, "!staticmc.hitTest(242, 300, false)"); // overright
265 check(mo, "!staticmc.hitTest(50, 193, false)"); // overup
266 check(mo, "!staticmc.hitTest(50, 407, false)"); // overdown
268 SWFMovie_nextFrame(mo);
270 SWFDisplayItem_skewXTo(it, 0);
272 check_equals(mo, "staticmc._x", "50");
273 check_equals(mo, "staticmc._y", "300");
274 check_equals(mo, "Math.round(staticmc._xscale)", "200");
275 check_equals(mo, "Math.round(staticmc._yscale)", "300");
276 check_equals(mo, "staticmc._rotation", "45");
277 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
278 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-56.25,193.75 156.25,406.25'");
279 check_equals(mo, "staticmc._width", "212.5");
280 check_equals(mo, "staticmc._height", "212.5");
282 // X: -56.25 156.25
283 // Y: 193.75 406.25
285 check(mo, "staticmc.hitTest(-56, 194, false)"); // top-left
286 check(mo, "staticmc.hitTest(156, 194, false)"); // top-right
287 check(mo, "staticmc.hitTest(-56, 406, false)"); // bottom-left
288 check(mo, "staticmc.hitTest(156, 406, false)"); // bottom-right
290 check(mo, "!staticmc.hitTest(-57, 300, false)"); // overleft
291 check(mo, "!staticmc.hitTest(157, 300, false)"); // overright
292 check(mo, "!staticmc.hitTest(50, 193, false)"); // overup
293 check(mo, "!staticmc.hitTest(50, 407, false)"); // overdown
296 SWFMovie_nextFrame(mo);
298 SWFDisplayItem_scaleTo(it, -2, 2);
300 check_equals(mo, "staticmc._x", "50");
301 check_equals(mo, "staticmc._y", "300");
302 check_equals(mo, "Math.round(staticmc._xscale)", "200");
303 check_equals(mo, "Math.round(staticmc._yscale)", "200");
304 check_equals(mo, "staticmc._rotation", "-135");
305 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
306 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-35,215 135,385'");
307 check_equals(mo, "staticmc._width", "170");
308 check_equals(mo, "staticmc._height", "170");
310 // X: -35 135
311 // Y: 215 385
313 check(mo, "staticmc.hitTest(-34, 216, false)"); // top-left
314 check(mo, "staticmc.hitTest(134, 216, false)"); // top-right
315 check(mo, "staticmc.hitTest(-34, 384, false)"); // bottom-left
316 check(mo, "staticmc.hitTest(134, 384, false)"); // bottom-right
318 check(mo, "!staticmc.hitTest(-36, 300, false)"); // overleft
319 check(mo, "!staticmc.hitTest(136, 300, false)"); // overright
320 check(mo, "!staticmc.hitTest(50, 214, false)"); // overup
321 check(mo, "!staticmc.hitTest(50, 386, false)"); // overdown
323 SWFMovie_nextFrame(mo);
325 SWFDisplayItem_scaleTo(it, 1, 1);
326 SWFDisplayItem_skewXTo(it, -2);
328 check_equals(mo, "staticmc._x", "50");
329 check_equals(mo, "staticmc._y", "300");
330 check_equals(mo, "Math.round(staticmc._xscale)", "100"); // non-rounded value differs with Gnash
331 check_equals(mo, "Math.round(staticmc._yscale)", "224"); // non-rounded value differs with Gnash
332 check_equals(mo, "Math.round(staticmc._rotation)", "135"); // non-rounded value differs with Gnash
333 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
334 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-35,257.5 135,342.5'");
335 check_equals(mo, "staticmc._width", "170");
336 check_equals(mo, "staticmc._height", "85");
338 // X: -35 135
339 // Y: 257.5 342.5
341 check(mo, "staticmc.hitTest(-34, 258, false)"); // top-left
342 check(mo, "staticmc.hitTest(134, 258, false)"); // top-right
343 check(mo, "staticmc.hitTest(-34, 342, false)"); // bottom-left
344 check(mo, "staticmc.hitTest(134, 342, false)"); // bottom-right
346 check(mo, "!staticmc.hitTest(-36, 300, false)"); // overleft
347 check(mo, "!staticmc.hitTest(136, 300, false)"); // overright
348 check(mo, "!staticmc.hitTest(50, 257, false)"); // overup
349 check(mo, "!staticmc.hitTest(50, 343, false)"); // overdown
351 SWFMovie_nextFrame(mo);
352 SWFDisplayItem_setMatrix(it, 1, 0, 0, 1, 50, 300); // reset to near-identity
353 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=0, d=1, tx=50, ty=300)'");
355 check_equals(mo, "staticmc._x", "50");
356 check_equals(mo, "staticmc._y", "300");
357 check_equals(mo, "staticmc._xscale", "100");
358 check_equals(mo, "staticmc._yscale", "100");
359 check_equals(mo, "staticmc._rotation", "0");
360 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
361 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'19.95,269.95 80.05,330.05'");
362 check_equals(mo, "staticmc._width", "60.1");
363 check_equals(mo, "staticmc._height", "60.1");
365 // X: 19.95 80.05
366 // Y: 269.95 330.05
368 check(mo, "staticmc.hitTest(20, 270, false)"); // top-left
369 check(mo, "staticmc.hitTest(80, 270, false)"); // top-right
370 check(mo, "staticmc.hitTest(20, 330, false)"); // bottom-left
371 check(mo, "staticmc.hitTest(80, 330, false)"); // bottom-right
373 check(mo, "!staticmc.hitTest(19, 300, false)"); // overleft
374 check(mo, "!staticmc.hitTest(81, 300, false)"); // overright
375 check(mo, "!staticmc.hitTest(50, 269, false)"); // overup
376 check(mo, "!staticmc.hitTest(50, 331, false)"); // overdown
378 SWFMovie_nextFrame(mo);
379 SWFDisplayItem_setMatrix(it, -1, 0, 0, 1, 50, 300); // negative x scale gets interpreted as 180 degrees rotation
380 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=0, c=0, d=1, tx=50, ty=300)'");
382 check_equals(mo, "staticmc._x", "50");
383 check_equals(mo, "staticmc._y", "300");
384 check_equals(mo, "staticmc._xscale", "100");
385 check_equals(mo, "staticmc._yscale", "100");
386 check_equals(mo, "staticmc._rotation", "180"); // x scale -1 gets interpreted as a 180 degree rotation
387 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
388 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'19.95,269.95 80.05,330.05'");
389 check_equals(mo, "staticmc._width", "60.1");
390 check_equals(mo, "staticmc._height", "60.1");
392 // X: 19.95 80.05
393 // Y: 269.95 330.05
395 check(mo, "staticmc.hitTest(20, 270, false)"); // top-left
396 check(mo, "staticmc.hitTest(80, 270, false)"); // top-right
397 check(mo, "staticmc.hitTest(20, 330, false)"); // bottom-left
398 check(mo, "staticmc.hitTest(80, 330, false)"); // bottom-right
400 check(mo, "!staticmc.hitTest(19, 300, false)"); // overleft
401 check(mo, "!staticmc.hitTest(81, 300, false)"); // overright
402 check(mo, "!staticmc.hitTest(50, 269, false)"); // overup
403 check(mo, "!staticmc.hitTest(50, 331, false)"); // overdown
405 SWFMovie_nextFrame(mo);
406 SWFDisplayItem_setMatrix(it, 1, 0, 0, -1, 50, 300); // negative y scale (discarded ?)
407 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=0, d=-1, tx=50, ty=300)'");
409 check_equals(mo, "staticmc._x", "50");
410 check_equals(mo, "staticmc._y", "300");
411 check_equals(mo, "staticmc._xscale", "100");
412 check_equals(mo, "staticmc._yscale", "100");
413 check_equals(mo, "staticmc._rotation", "0");
414 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
415 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'19.95,269.95 80.05,330.05'");
416 check_equals(mo, "staticmc._width", "60.1");
417 check_equals(mo, "staticmc._height", "60.1");
419 // X: 19.95 80.05
420 // Y: 269.95 330.05
422 check(mo, "staticmc.hitTest(20, 270, false)"); // top-left
423 check(mo, "staticmc.hitTest(80, 270, false)"); // top-right
424 check(mo, "staticmc.hitTest(20, 330, false)"); // bottom-left
425 check(mo, "staticmc.hitTest(80, 330, false)"); // bottom-right
427 check(mo, "!staticmc.hitTest(19, 300, false)"); // overleft
428 check(mo, "!staticmc.hitTest(81, 300, false)"); // overright
429 check(mo, "!staticmc.hitTest(50, 269, false)"); // overup
430 check(mo, "!staticmc.hitTest(50, 331, false)"); // overdown
432 SWFMovie_nextFrame(mo);
433 SWFDisplayItem_setMatrix(it, -1, 0, 0, -1, 50, 300); // negative x and y scales
434 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=0, c=0, d=-1, tx=50, ty=300)'");
436 check_equals(mo, "staticmc._x", "50");
437 check_equals(mo, "staticmc._y", "300");
438 check_equals(mo, "staticmc._xscale", "100");
439 check_equals(mo, "staticmc._yscale", "100");
440 check_equals(mo, "staticmc._rotation", "180");
441 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
442 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'19.95,269.95 80.05,330.05'");
443 check_equals(mo, "staticmc._width", "60.1");
444 check_equals(mo, "staticmc._height", "60.1");
446 // X: 19.95 80.05
447 // Y: 269.95 330.05
449 check(mo, "staticmc.hitTest(20, 270, false)"); // top-left
450 check(mo, "staticmc.hitTest(80, 270, false)"); // top-right
451 check(mo, "staticmc.hitTest(20, 330, false)"); // bottom-left
452 check(mo, "staticmc.hitTest(80, 330, false)"); // bottom-right
454 check(mo, "!staticmc.hitTest(19, 300, false)"); // overleft
455 check(mo, "!staticmc.hitTest(81, 300, false)"); // overright
456 check(mo, "!staticmc.hitTest(50, 269, false)"); // overup
457 check(mo, "!staticmc.hitTest(50, 331, false)"); // overdown
459 SWFMovie_nextFrame(mo);
460 SWFDisplayItem_setMatrix(it, -1, -45, 0, 1, 50, 300); // negative x scale and some negative skew
461 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=-45, c=0, d=1, tx=50, ty=300)'");
463 check_equals(mo, "staticmc._x", "50");
464 check_equals(mo, "staticmc._y", "300");
465 check_equals(mo, "Math.round(staticmc._xscale)", "4501"); // let's tollerate precision for now
466 check_equals(mo, "staticmc._yscale", "100");
467 check_equals(mo, "Math.round(staticmc._rotation)", "-91"); // let's tollerate precision for now
468 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
469 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'19.95,-1082.3 80.05,1682.3'");
470 check_equals(mo, "staticmc._width", "60.1");
471 check_equals(mo, "Math.round(staticmc._height*10)", "27646");
473 // X: 19.95 80.05
474 // Y: -1082.3 1682.3
476 check(mo, "staticmc.hitTest(20, -1082, false)"); // top-left
477 check(mo, "staticmc.hitTest(80, -1082, false)"); // top-right
478 check(mo, "staticmc.hitTest(20, 1682, false)"); // bottom-left
479 check(mo, "staticmc.hitTest(80, 1682, false)"); // bottom-right
481 check(mo, "!staticmc.hitTest(19, 0, false)"); // overleft
482 check(mo, "!staticmc.hitTest(81, 0, false)"); // overright
483 check(mo, "!staticmc.hitTest(50, -1083, false)"); // overup
484 check(mo, "!staticmc.hitTest(50, 1683, false)"); // overdown
486 SWFMovie_nextFrame(mo);
487 SWFDisplayItem_setMatrix(it, -1, 45, 0, 1, 50, 300); // negative x scale and some positive skew
488 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=45, c=0, d=1, tx=50, ty=300)'");
490 check_equals(mo, "staticmc._x", "50");
491 check_equals(mo, "staticmc._y", "300");
492 check_equals(mo, "Math.round(staticmc._xscale)", "4501"); // let's tollerate precision for now
493 check_equals(mo, "staticmc._yscale", "100");
494 check_equals(mo, "Math.round(staticmc._rotation)", "91"); // let's tollerate precision for now
495 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
496 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'19.95,-1082.3 80.05,1682.3'");
497 check_equals(mo, "staticmc._width", "60.1");
498 check_equals(mo, "Math.round(staticmc._height*10)", "27646");
500 // X: 19.95 80.05
501 // Y: -1082.3 1682.3
503 check(mo, "staticmc.hitTest(20, -1082, false)"); // top-left
504 check(mo, "staticmc.hitTest(80, -1082, false)"); // top-right
505 check(mo, "staticmc.hitTest(20, 1682, false)"); // bottom-left
506 check(mo, "staticmc.hitTest(80, 1682, false)"); // bottom-right
508 check(mo, "!staticmc.hitTest(19, 0, false)"); // overleft
509 check(mo, "!staticmc.hitTest(81, 0, false)"); // overright
510 check(mo, "!staticmc.hitTest(50, -1083, false)"); // overup
511 check(mo, "!staticmc.hitTest(50, 1683, false)"); // overdown
513 SWFMovie_nextFrame(mo);
514 SWFDisplayItem_setMatrix(it, 1, -45, 0, -1, 50, 300); // negative x scale and some negative skew
515 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=-45, c=0, d=-1, tx=50, ty=300)'");
517 check_equals(mo, "staticmc._x", "50");
518 check_equals(mo, "staticmc._y", "300");
519 check_equals(mo, "Math.round(staticmc._xscale)", "4501"); // let's tollerate precision for now
520 check_equals(mo, "staticmc._yscale", "100");
521 check_equals(mo, "Math.round(staticmc._rotation)", "-89"); // let's tollerate precision for now
522 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
523 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'19.95,-1082.3 80.05,1682.3'");
524 check_equals(mo, "staticmc._width", "60.1");
525 check_equals(mo, "Math.round(staticmc._height*10)", "27646");
527 // X: 19.95 80.05
528 // Y: -1082.3 1682.3
530 check(mo, "staticmc.hitTest(20, -1082, false)"); // top-left
531 check(mo, "staticmc.hitTest(80, -1082, false)"); // top-right
532 check(mo, "staticmc.hitTest(20, 1682, false)"); // bottom-left
533 check(mo, "staticmc.hitTest(80, 1682, false)"); // bottom-right
535 check(mo, "!staticmc.hitTest(19, 0, false)"); // overleft
536 check(mo, "!staticmc.hitTest(81, 0, false)"); // overright
537 check(mo, "!staticmc.hitTest(50, -1083, false)"); // overup
538 check(mo, "!staticmc.hitTest(50, 1683, false)"); // overdown
540 SWFMovie_nextFrame(mo);
541 SWFDisplayItem_setMatrix(it, 1, 45, 0, -1, 50, 300); // negative x scale and some positive skew
542 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=45, c=0, d=-1, tx=50, ty=300)'");
544 check_equals(mo, "staticmc._x", "50");
545 check_equals(mo, "staticmc._y", "300");
546 check_equals(mo, "Math.round(staticmc._xscale)", "4501"); // let's tollerate precision for now
547 check_equals(mo, "staticmc._yscale", "100");
548 check_equals(mo, "Math.round(staticmc._rotation)", "89"); // let's tollerate precision for now
549 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
550 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'19.95,-1082.3 80.05,1682.3'");
551 check_equals(mo, "staticmc._width", "60.1");
552 check_equals(mo, "Math.round(staticmc._height*10)", "27646");
554 // X: 19.95 80.05
555 // Y: -1082.3 1682.3
557 check(mo, "staticmc.hitTest(20, -1082, false)"); // top-left
558 check(mo, "staticmc.hitTest(80, -1082, false)"); // top-right
559 check(mo, "staticmc.hitTest(20, 1682, false)"); // bottom-left
560 check(mo, "staticmc.hitTest(80, 1682, false)"); // bottom-right
562 check(mo, "!staticmc.hitTest(19, 0, false)"); // overleft
563 check(mo, "!staticmc.hitTest(81, 0, false)"); // overright
564 check(mo, "!staticmc.hitTest(50, -1083, false)"); // overup
565 check(mo, "!staticmc.hitTest(50, 1683, false)"); // overdown
567 SWFMovie_nextFrame(mo);
568 SWFDisplayItem_setMatrix(it, -1, 45, 0, -1, 50, 300); // negative x scale and some positive skew
569 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=45, c=0, d=-1, tx=50, ty=300)'");
571 check_equals(mo, "staticmc._x", "50");
572 check_equals(mo, "staticmc._y", "300");
573 check_equals(mo, "Math.round(staticmc._xscale)", "4501"); // let's tollerate precision for now
574 check_equals(mo, "staticmc._yscale", "100");
575 check_equals(mo, "Math.round(staticmc._rotation)", "91"); // let's tollerate precision for now
576 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
577 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'19.95,-1082.3 80.05,1682.3'");
578 check_equals(mo, "staticmc._width", "60.1");
579 check_equals(mo, "Math.round(staticmc._height*10)", "27646");
581 // X: 19.95 80.05
582 // Y: -1082.3 1682.3
584 check(mo, "staticmc.hitTest(20, -1082, false)"); // top-left
585 check(mo, "staticmc.hitTest(80, -1082, false)"); // top-right
586 check(mo, "staticmc.hitTest(20, 1682, false)"); // bottom-left
587 check(mo, "staticmc.hitTest(80, 1682, false)"); // bottom-right
589 check(mo, "!staticmc.hitTest(19, 0, false)"); // overleft
590 check(mo, "!staticmc.hitTest(81, 0, false)"); // overright
591 check(mo, "!staticmc.hitTest(50, -1083, false)"); // overup
592 check(mo, "!staticmc.hitTest(50, 1683, false)"); // overdown
594 SWFMovie_nextFrame(mo);
595 SWFDisplayItem_setMatrix(it, -1, -45, 0, -1, 50, 300); // negative x scale and some positive skew
596 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=-45, c=0, d=-1, tx=50, ty=300)'");
598 check_equals(mo, "staticmc._x", "50");
599 check_equals(mo, "staticmc._y", "300");
600 check_equals(mo, "Math.round(staticmc._xscale)", "4501"); // let's tollerate precision for now
601 check_equals(mo, "staticmc._yscale", "100");
602 check_equals(mo, "Math.round(staticmc._rotation)", "-91"); // let's tollerate precision for now
603 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
604 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'19.95,-1082.3 80.05,1682.3'");
605 check_equals(mo, "staticmc._width", "60.1");
606 check_equals(mo, "Math.round(staticmc._height*10)", "27646");
608 // X: 19.95 80.05
609 // Y: -1082.3 1682.3
611 check(mo, "staticmc.hitTest(20, -1082, false)"); // top-left
612 check(mo, "staticmc.hitTest(80, -1082, false)"); // top-right
613 check(mo, "staticmc.hitTest(20, 1682, false)"); // bottom-left
614 check(mo, "staticmc.hitTest(80, 1682, false)"); // bottom-right
616 check(mo, "!staticmc.hitTest(19, 0, false)"); // overleft
617 check(mo, "!staticmc.hitTest(81, 0, false)"); // overright
618 check(mo, "!staticmc.hitTest(50, -1083, false)"); // overup
619 check(mo, "!staticmc.hitTest(50, 1683, false)"); // overdown
622 SWFMovie_nextFrame(mo);
623 SWFDisplayItem_setMatrix(it, -1, 0, -45, 1, 50, 300); // negative x scale and some negative skew
624 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=0, c=-45, d=1, tx=50, ty=300)'");
626 check_equals(mo, "staticmc._x", "50");
627 check_equals(mo, "staticmc._y", "300");
628 check_equals(mo, "staticmc._xscale", "100");
629 check_equals(mo, "Math.round(staticmc._yscale)", "4501"); // let's tollerate precision for now
630 check_equals(mo, "staticmc._rotation", "180");
631 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
632 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-1332.3,269.95 1432.3,330.05'");
633 check_equals(mo, "Math.round(staticmc._width*10)", "27646");
634 check_equals(mo, "staticmc._height", "60.1");
636 // X: -1332.3 1432.3
637 // Y: 269.95 330.05
639 check(mo, "staticmc.hitTest(-1332, 270, false)"); // top-left
640 check(mo, "staticmc.hitTest(1432, 270, false)"); // top-right
641 check(mo, "staticmc.hitTest(-1332, 330, false)"); // bottom-left
642 check(mo, "staticmc.hitTest(1432, 330, false)"); // bottom-right
644 check(mo, "!staticmc.hitTest(-1333, 300, false)"); // overleft
645 check(mo, "!staticmc.hitTest(1433, 300, false)"); // overright
646 check(mo, "!staticmc.hitTest(0, 269, false)"); // overup
647 check(mo, "!staticmc.hitTest(0, 331, false)"); // overdown
650 SWFMovie_nextFrame(mo);
651 SWFDisplayItem_setMatrix(it, -1, 0, 45, 1, 50, 300); // negative x scale and some positive skew
652 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=0, c=45, d=1, tx=50, ty=300)'");
654 check_equals(mo, "staticmc._x", "50");
655 check_equals(mo, "staticmc._y", "300");
656 check_equals(mo, "staticmc._xscale", "100");
657 check_equals(mo, "Math.round(staticmc._yscale)", "4501"); // let's tollerate precision for now
658 check_equals(mo, "staticmc._rotation", "180");
659 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
660 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-1332.3,269.95 1432.3,330.05'");
661 check_equals(mo, "Math.round(staticmc._width*10)", "27646");
662 check_equals(mo, "staticmc._height", "60.1");
664 // X: -1332.3 1432.3
665 // Y: 269.95 330.05
667 check(mo, "staticmc.hitTest(-1332, 270, false)"); // top-left
668 check(mo, "staticmc.hitTest(1432, 270, false)"); // top-right
669 check(mo, "staticmc.hitTest(-1332, 330, false)"); // bottom-left
670 check(mo, "staticmc.hitTest(1432, 330, false)"); // bottom-right
672 check(mo, "!staticmc.hitTest(-1333, 300, false)"); // overleft
673 check(mo, "!staticmc.hitTest(1433, 300, false)"); // overright
674 check(mo, "!staticmc.hitTest(0, 269, false)"); // overup
675 check(mo, "!staticmc.hitTest(0, 331, false)"); // overdown
678 SWFMovie_nextFrame(mo);
679 SWFDisplayItem_setMatrix(it, 1, 0, -45, -1, 50, 300); // negative x scale and some negative skew
680 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=-45, d=-1, tx=50, ty=300)'");
682 check_equals(mo, "staticmc._x", "50");
683 check_equals(mo, "staticmc._y", "300");
684 check_equals(mo, "staticmc._xscale", "100");
685 check_equals(mo, "Math.round(staticmc._yscale)", "4501"); // let's tollerate precision for now
686 check_equals(mo, "staticmc._rotation", "0");
687 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
688 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-1332.3,269.95 1432.3,330.05'");
689 check_equals(mo, "Math.round(staticmc._width*10)", "27646");
690 check_equals(mo, "staticmc._height", "60.1");
692 // X: -1332.3 1432.3
693 // Y: 269.95 330.05
695 check(mo, "staticmc.hitTest(-1332, 270, false)"); // top-left
696 check(mo, "staticmc.hitTest(1432, 270, false)"); // top-right
697 check(mo, "staticmc.hitTest(-1332, 330, false)"); // bottom-left
698 check(mo, "staticmc.hitTest(1432, 330, false)"); // bottom-right
700 check(mo, "!staticmc.hitTest(-1333, 300, false)"); // overleft
701 check(mo, "!staticmc.hitTest(1433, 300, false)"); // overright
702 check(mo, "!staticmc.hitTest(0, 269, false)"); // overup
703 check(mo, "!staticmc.hitTest(0, 331, false)"); // overdown
706 SWFMovie_nextFrame(mo);
707 SWFDisplayItem_setMatrix(it, 1, 0, 45, -1, 50, 300); // negative x scale and some positive skew
708 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=45, d=-1, tx=50, ty=300)'");
710 check_equals(mo, "staticmc._x", "50");
711 check_equals(mo, "staticmc._y", "300");
712 check_equals(mo, "staticmc._xscale", "100");
713 check_equals(mo, "Math.round(staticmc._yscale)", "4501"); // let's tollerate precision for now
714 check_equals(mo, "staticmc._rotation", "0");
715 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
716 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-1332.3,269.95 1432.3,330.05'");
717 check_equals(mo, "Math.round(staticmc._width*10)", "27646");
718 check_equals(mo, "staticmc._height", "60.1");
720 // X: -1332.3 1432.3
721 // Y: 269.95 330.05
723 check(mo, "staticmc.hitTest(-1332, 270, false)"); // top-left
724 check(mo, "staticmc.hitTest(1432, 270, false)"); // top-right
725 check(mo, "staticmc.hitTest(-1332, 330, false)"); // bottom-left
726 check(mo, "staticmc.hitTest(1432, 330, false)"); // bottom-right
728 check(mo, "!staticmc.hitTest(-1333, 300, false)"); // overleft
729 check(mo, "!staticmc.hitTest(1433, 300, false)"); // overright
730 check(mo, "!staticmc.hitTest(0, 269, false)"); // overup
731 check(mo, "!staticmc.hitTest(0, 331, false)"); // overdown
734 SWFMovie_nextFrame(mo);
735 SWFDisplayItem_setMatrix(it, -1, 0, 45, -1, 50, 300); // negative x scale and some positive skew
736 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=0, c=45, d=-1, tx=50, ty=300)'");
738 check_equals(mo, "staticmc._x", "50");
739 check_equals(mo, "staticmc._y", "300");
740 check_equals(mo, "staticmc._xscale", "100");
741 check_equals(mo, "Math.round(staticmc._yscale)", "4501"); // let's tollerate precision for now
742 check_equals(mo, "staticmc._rotation", "180");
743 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
744 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-1332.3,269.95 1432.3,330.05'");
745 check_equals(mo, "Math.round(staticmc._width*10)", "27646");
746 check_equals(mo, "staticmc._height", "60.1");
748 // X: -1332.3 1432.3
749 // Y: 269.95 330.05
751 check(mo, "staticmc.hitTest(-1332, 270, false)"); // top-left
752 check(mo, "staticmc.hitTest(1432, 270, false)"); // top-right
753 check(mo, "staticmc.hitTest(-1332, 330, false)"); // bottom-left
754 check(mo, "staticmc.hitTest(1432, 330, false)"); // bottom-right
756 check(mo, "!staticmc.hitTest(-1333, 300, false)"); // overleft
757 check(mo, "!staticmc.hitTest(1433, 300, false)"); // overright
758 check(mo, "!staticmc.hitTest(0, 269, false)"); // overup
759 check(mo, "!staticmc.hitTest(0, 331, false)"); // overdown
762 SWFMovie_nextFrame(mo);
763 SWFDisplayItem_setMatrix(it, -1, 0, -45, -1, 50, 300); // negative x scale and some positive skew
764 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=0, c=-45, d=-1, tx=50, ty=300)'");
766 check_equals(mo, "staticmc._x", "50");
767 check_equals(mo, "staticmc._y", "300");
768 check_equals(mo, "staticmc._xscale", "100");
769 check_equals(mo, "Math.round(staticmc._yscale)", "4501"); // let's tollerate precision for now
770 check_equals(mo, "staticmc._rotation", "180");
771 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
772 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-1332.3,269.95 1432.3,330.05'");
773 check_equals(mo, "Math.round(staticmc._width*10)", "27646");
774 check_equals(mo, "staticmc._height", "60.1");
776 // X: -1332.3 1432.3
777 // Y: 269.95 330.05
779 check(mo, "staticmc.hitTest(-1332, 270, false)"); // top-left
780 check(mo, "staticmc.hitTest(1432, 270, false)"); // top-right
781 check(mo, "staticmc.hitTest(-1332, 330, false)"); // bottom-left
782 check(mo, "staticmc.hitTest(1432, 330, false)"); // bottom-right
784 check(mo, "!staticmc.hitTest(-1333, 300, false)"); // overleft
785 check(mo, "!staticmc.hitTest(1433, 300, false)"); // overright
786 check(mo, "!staticmc.hitTest(0, 269, false)"); // overup
787 check(mo, "!staticmc.hitTest(0, 331, false)"); // overdown
789 SWFMovie_nextFrame(mo);
790 SWFDisplayItem_setMatrix(it, -2, 0, -45, -0.5, 50, 300); // negative x scale and some positive skew
791 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-2, b=0, c=-45, d=-0.5, tx=50, ty=300)'");
793 check_equals(mo, "staticmc._x", "50");
794 check_equals(mo, "staticmc._y", "300");
795 check_equals(mo, "staticmc._xscale", "200");
796 check_equals(mo, "Math.round(staticmc._yscale)", "4500"); // let's tollerate precision for now
797 check_equals(mo, "staticmc._rotation", "180");
798 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
799 check_equals(mo, "printBounds(staticmc.getBounds(_root),0)", "'-1362,285 1462,315'"); // when not rounded, gives different results in SWF6 and SWF8
800 check_equals(mo, "Math.round(staticmc._width*10)", "28247");
801 check_equals(mo, "Math.round(staticmc._height)", "30"); // when not rounded, gives different results in SWF6 and SWF8
803 // X: -1362.35 1462.35
804 // Y: 285.00 315.05
806 check(mo, "staticmc.hitTest(-1362, 286, false)"); // top-left
807 check(mo, "staticmc.hitTest(1462, 286, false)"); // top-right
808 check(mo, "staticmc.hitTest(-1362, 315, false)"); // bottom-left
809 check(mo, "staticmc.hitTest(1462, 315, false)"); // bottom-right
811 check(mo, "!staticmc.hitTest(-1363, 300, false)"); // overleft
812 check(mo, "!staticmc.hitTest(1463, 300, false)"); // overright
813 check(mo, "!staticmc.hitTest(0, 284, false)"); // overup
814 check(mo, "!staticmc.hitTest(0, 316, false)"); // overdown
816 SWFMovie_nextFrame(mo);
817 SWFDisplayItem_setMatrix(it, 1, 1, 1, 1, 2, 3); // not-invertible matrix (I'd think)
818 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=1, c=1, d=1, tx=2, ty=3)'");
820 check_equals(mo, "staticmc._x", "2");
821 check_equals(mo, "staticmc._y", "3");
822 check_equals(mo, "Math.round(staticmc._xscale)", "141");
823 check_equals(mo, "Math.round(staticmc._yscale)", "141");
824 check_equals(mo, "staticmc._rotation", "45");
825 check_equals(mo, "printBounds(staticmc.getBounds())", "'-30.05,-30.05 30.05,30.05'");
826 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-58.1,-57.1 62.1,63.1'");
827 add_actions(mo, "o = {x:1, y:1}; staticmc.localToGlobal(o);");
828 check_equals(mo, "o.x", "4");
829 check_equals(mo, "o.y", "5");
830 add_actions(mo, "o = {x:1, y:1}; staticmc.globalToLocal(o);"); // this triggers matrix inversion
831 check_equals(mo, "o.x", "1");
832 check_equals(mo, "o.y", "1");
833 add_actions(mo, "o = {x:4, y:5}; staticmc.globalToLocal(o);"); // this triggers matrix inversion
834 check_equals(mo, "o.x", "4");
835 check_equals(mo, "o.y", "5");
836 check_equals(mo, "Math.round(staticmc._width*10)", "1202");
837 check_equals(mo, "staticmc._height", "120.2");
839 // This is a matrix found in the mario.swf movie (bug #24280)
841 // Matrix:
842 // ScaleX 0.000000 ScaleY 0.000000
843 // RotateSkew0 -1.000000 RotateSkew1 1.167969
844 // TranslateX -15 TranslateY 2700
846 SWFMovie_nextFrame(mo);
847 SWFDisplayItem_setMatrix(it, 0, -1, 1.167969, 0, -.75, 135);
848 check_equals(mo, "staticmc._x", "-0.75");
849 check_equals(mo, "staticmc._y", "135");
851 // Ming 0.4.2 (aka 0.4.0-rc2) omits the scales rather then set them to zero
852 #if MING_VERSION_CODE <= 40200
853 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=-1, c=1.16796875, d=1, tx=-0.75, ty=135)'");
854 check_equals(mo, "Math.round(staticmc._xscale)", "141");
855 check_equals(mo, "Math.round(staticmc._yscale)", "154");
856 check_equals(mo, "staticmc._rotation", "-45");
857 #else
858 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=0, b=-1, c=1.16796875, d=0, tx=-0.75, ty=135)'");
859 check_equals(mo, "Math.round(staticmc._xscale)", "100");
860 check_equals(mo, "Math.round(staticmc._yscale)", "117");
861 check_equals(mo, "staticmc._rotation", "-90");
862 #endif
864 // This is a matrix found in the mario.swf movie (bug #24280)
866 // Matrix:
867 // ScaleX 0.000000 ScaleY 0.000000
868 // RotateSkew0 0.972519 RotateSkew1 -1.000000
869 // TranslateX 279 TranslateY 4296
871 SWFMovie_nextFrame(mo);
872 SWFDisplayItem_setMatrix(it, 0, 0.972519, -1, 0, 13.950, 214.80);
873 check_equals(mo, "Math.round(staticmc._x*100)/100", "13.95");
874 check_equals(mo, "staticmc._y", "214.80");
876 // Ming 0.4.2 (aka 0.4.0-rc2) omits the scales rather then set them to zero
877 #if MING_VERSION_CODE <= 40200
878 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0.972518920898438, c=-1, d=1, tx=13.95, ty=214.8)'");
879 check_equals(mo, "Math.round(staticmc._xscale)", "139");
880 check_equals(mo, "Math.round(staticmc._yscale)", "141");
881 check_equals(mo, "Math.round(staticmc._rotation)", "44");
882 #else
883 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=0, b=0.972518920898438, c=-1, d=0, tx=13.95, ty=214.8)'");
884 check_equals(mo, "Math.round(staticmc._xscale)", "97");
885 check_equals(mo, "Math.round(staticmc._yscale)", "100");
886 check_equals(mo, "Math.round(staticmc._rotation)", "90");
887 #endif
891 // Now test setting parameters after reading matrix
894 SWFMovie_nextFrame(mo);
896 SWFDisplayItem_remove(it);
897 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
898 SWFDisplayItem_setMatrix(it, 1, 0, 0, -2, 200, 200);
899 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'169.95,139.9 230.05,260.1'");
900 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=0, d=-2, tx=200, ty=200)'");
901 check_equals(mo, "staticmc._xscale", "100");
902 check_equals(mo, "staticmc._rotation", "0");
903 check_equals(mo, "staticmc._yscale", "200");
905 add_actions(mo, "staticmc._yscale = 100;"); // swap _yscale sign using ActionScript
906 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=0, c=0, d=-1, tx=200, ty=200)'");
907 check_equals(mo, "staticmc._yscale", "100");
908 check_equals(mo, "staticmc._rotation", "0");
909 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,170 230,230'");
911 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
912 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'169.95,169.95 230.05,230.05'");
913 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=0, d=1, tx=200, ty=200)'");
914 check_equals(mo, "staticmc._yscale", "-100");
915 check_equals(mo, "staticmc._xscale", "100");
916 check_equals(mo, "staticmc._rotation", "0");
918 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
919 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=0, c=0, d=-1, tx=200, ty=200)'");
920 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'169.95,169.95 230.05,230.05'");
921 check_equals(mo, "staticmc._yscale", "100");
922 check_equals(mo, "staticmc._xscale", "100");
923 check_equals(mo, "staticmc._rotation", "0");
925 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
926 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=0, c=0, d=-1, tx=200, ty=200)'");
927 check_equals(mo, "staticmc._xscale", "-100");
928 check_equals(mo, "staticmc._yscale", "100");
929 check_equals(mo, "staticmc._rotation", "0");
930 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,170 230,230'");
932 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
933 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=-0.03, c=0.03, d=-1, tx=200, ty=200)'");
934 check_equals(mo, "staticmc._yscale", "100");
935 check_equals(mo, "staticmc._xscale", "-100");
936 check_equals(mo, "staticmc._rotation", "2");
937 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'169,169 231,231'");
939 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
940 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=0.03, c=-0.03, d=-1, tx=200, ty=200)'");
941 check_equals(mo, "staticmc._yscale", "100");
942 check_equals(mo, "staticmc._xscale", "-100");
943 check_equals(mo, "staticmc._rotation", "-2");
944 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'169,169 231,231'");
946 add_actions(mo, "staticmc._rotation = -90;"); // change _rotation using ActionScript
947 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=0, b=1, c=-1, d=0, tx=200, ty=200)'");
948 check_equals(mo, "staticmc._yscale", "100");
949 check_equals(mo, "staticmc._xscale", "-100");
950 check_equals(mo, "staticmc._rotation", "-90");
951 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,170 230,230'");
953 add_actions(mo, "staticmc._yscale = -100;"); // change _rotation using ActionScript
954 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=0, b=1, c=1, d=0, tx=200, ty=200)'");
955 check_equals(mo, "staticmc._yscale", "-100");
956 check_equals(mo, "staticmc._xscale", "-100");
957 check_equals(mo, "staticmc._rotation", "-90");
958 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,170 230,230'");
960 SWFMovie_nextFrame(mo);
962 SWFDisplayItem_remove(it);
963 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
964 SWFDisplayItem_setMatrix(it, 1, 0, 2, 1, 200, 200);
965 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'109.85,169.95 290.15,230.05'");
966 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=2, d=1, tx=200, ty=200)'");
968 check_equals(mo, "staticmc._rotation", "0");
969 check_equals(mo, "Math.round(staticmc._yscale)", "224");
970 check_equals(mo, "staticmc._xscale", "100");
971 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
972 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=0, c=2, d=1, tx=200, ty=200)'");
973 check_equals(mo, "staticmc._xscale", "-100");
974 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,170 290,230'");
976 check_equals(mo, "staticmc._rotation", "0");
977 check_equals(mo, "Math.round(staticmc._yscale)", "224");
978 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
979 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=0, c=-2, d=-1, tx=200, ty=200)'");
980 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
981 check_equals(mo, "staticmc._xscale", "-100");
982 check_equals(mo, "staticmc._rotation", "0");
983 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,170 290,230'");
985 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
986 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=-0.03, c=-1.96, d=-1.07, tx=200, ty=200)'");
987 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
988 check_equals(mo, "staticmc._xscale", "-100");
989 check_equals(mo, "staticmc._rotation", "2");
990 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'111,167 289,233'");
992 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
993 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=0.03, c=-2.03, d=-0.93, tx=200, ty=200)'");
994 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
995 check_equals(mo, "staticmc._xscale", "-100");
996 check_equals(mo, "staticmc._rotation", "-2");
997 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'109,171 291,229'");
999 SWFMovie_nextFrame(mo);
1001 SWFDisplayItem_remove(it);
1002 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1003 SWFDisplayItem_setMatrix(it, 1, 0, -2, 1, 200, 200);
1004 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'109.85,169.95 290.15,230.05'");
1005 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=-2, d=1, tx=200, ty=200)'");
1007 check_equals(mo, "staticmc._rotation", "0");
1008 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1009 check_equals(mo, "staticmc._xscale", "100");
1010 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1011 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=0, c=-2, d=1, tx=200, ty=200)'");
1012 check_equals(mo, "staticmc._xscale", "-100");
1013 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,170 290,230'");
1015 check_equals(mo, "staticmc._rotation", "0");
1016 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1017 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1018 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=0, c=2, d=-1, tx=200, ty=200)'");
1019 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1020 check_equals(mo, "staticmc._xscale", "-100");
1021 check_equals(mo, "staticmc._rotation", "0");
1022 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,170 290,230'");
1024 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1025 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=-0.03, c=2.03, d=-0.93, tx=200, ty=200)'");
1026 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1027 check_equals(mo, "staticmc._xscale", "-100");
1028 check_equals(mo, "staticmc._rotation", "2");
1029 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'109,171 291,229'");
1031 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1032 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=0.03, c=1.96, d=-1.07, tx=200, ty=200)'");
1033 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1034 check_equals(mo, "staticmc._xscale", "-100");
1035 check_equals(mo, "staticmc._rotation", "-2");
1036 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'111,167 289,233'");
1039 SWFMovie_nextFrame(mo);
1041 SWFDisplayItem_remove(it);
1042 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1043 SWFDisplayItem_setMatrix(it, 1, 0, -2, -1, 200, 200);
1044 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'109.85,169.95 290.15,230.05'");
1045 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=-2, d=-1, tx=200, ty=200)'");
1047 check_equals(mo, "staticmc._rotation", "0");
1048 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1049 check_equals(mo, "staticmc._xscale", "100");
1050 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1051 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=0, c=-2, d=-1, tx=200, ty=200)'");
1052 check_equals(mo, "staticmc._xscale", "-100");
1053 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,170 290,230'");
1055 check_equals(mo, "staticmc._rotation", "0");
1056 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1057 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1058 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=0, c=2, d=1, tx=200, ty=200)'");
1059 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1060 check_equals(mo, "staticmc._xscale", "-100");
1061 check_equals(mo, "staticmc._rotation", "0");
1062 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,170 290,230'");
1064 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1065 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=-0.03, c=1.96, d=1.07, tx=200, ty=200)'");
1066 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1067 check_equals(mo, "staticmc._xscale", "-100");
1068 check_equals(mo, "staticmc._rotation", "2");
1069 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'111,167 289,233'");
1071 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1072 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=0.03, c=2.03, d=0.93, tx=200, ty=200)'");
1073 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1074 check_equals(mo, "staticmc._xscale", "-100");
1075 check_equals(mo, "staticmc._rotation", "-2");
1076 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'109,171 291,229'");
1079 SWFMovie_nextFrame(mo);
1081 SWFDisplayItem_remove(it);
1082 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1083 SWFDisplayItem_setMatrix(it, -1, 0, 2, 1, 200, 200);
1084 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'109.85,169.95 290.15,230.05'");
1085 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=0, c=2, d=1, tx=200, ty=200)'");
1087 check_equals(mo, "staticmc._rotation", "180");
1088 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1089 check_equals(mo, "staticmc._xscale", "100");
1090 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1091 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=0, c=2, d=1, tx=200, ty=200)'");
1092 check_equals(mo, "staticmc._xscale", "-100");
1093 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,170 290,230'");
1095 check_equals(mo, "staticmc._rotation", "180");
1096 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1097 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1098 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=0, c=-2, d=-1, tx=200, ty=200)'");
1099 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1100 check_equals(mo, "staticmc._xscale", "-100");
1101 check_equals(mo, "staticmc._rotation", "180");
1102 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,170 290,230'");
1104 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1105 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=-0.03, c=1.96, d=1.07, tx=200, ty=200)'");
1106 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1107 check_equals(mo, "staticmc._xscale", "-100");
1108 check_equals(mo, "staticmc._rotation", "2");
1109 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'111,167 289,233'");
1111 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1112 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=0.03, c=2.03, d=0.93, tx=200, ty=200)'");
1113 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1114 check_equals(mo, "staticmc._xscale", "-100");
1115 check_equals(mo, "staticmc._rotation", "-2");
1116 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'109,171 291,229'");
1118 SWFMovie_nextFrame(mo);
1120 SWFDisplayItem_remove(it);
1121 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1122 SWFDisplayItem_setMatrix(it, -1, 0, -2, 1, 200, 200);
1123 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'109.85,169.95 290.15,230.05'");
1124 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=0, c=-2, d=1, tx=200, ty=200)'");
1126 check_equals(mo, "staticmc._rotation", "180");
1127 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1128 check_equals(mo, "staticmc._xscale", "100");
1129 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1130 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=0, c=-2, d=1, tx=200, ty=200)'");
1131 check_equals(mo, "staticmc._xscale", "-100");
1132 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,170 290,230'");
1134 check_equals(mo, "staticmc._rotation", "180");
1135 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=0, c=-2, d=1, tx=200, ty=200)'");
1136 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1137 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1138 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1139 check_equals(mo, "staticmc._xscale", "-100");
1140 check_equals(mo, "staticmc._rotation", "180");
1141 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,170 290,230'");
1143 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1144 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=-0.03, c=-2.03, d=0.93, tx=200, ty=200)'");
1145 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1146 check_equals(mo, "staticmc._xscale", "-100");
1147 check_equals(mo, "staticmc._rotation", "2");
1148 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'109,171 291,229'");
1150 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1151 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=0.03, c=-1.96, d=1.07, tx=200, ty=200)'");
1152 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1153 check_equals(mo, "staticmc._xscale", "-100");
1154 check_equals(mo, "staticmc._rotation", "-2");
1155 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'111,167 289,233'");
1157 SWFMovie_nextFrame(mo);
1159 SWFDisplayItem_remove(it);
1160 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1161 SWFDisplayItem_setMatrix(it, -1, 0, -2, -1, 200, 200);
1162 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'109.85,169.95 290.15,230.05'");
1163 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=0, c=-2, d=-1, tx=200, ty=200)'");
1165 check_equals(mo, "staticmc._rotation", "180");
1166 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1167 check_equals(mo, "staticmc._xscale", "100");
1168 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1169 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=0, c=-2, d=-1, tx=200, ty=200)'");
1170 check_equals(mo, "staticmc._xscale", "-100");
1171 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,170 290,230'");
1173 check_equals(mo, "staticmc._rotation", "180");
1174 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1175 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1176 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=0, c=2, d=1, tx=200, ty=200)'");
1177 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1178 check_equals(mo, "staticmc._xscale", "-100");
1179 check_equals(mo, "staticmc._rotation", "180");
1180 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,170 290,230'");
1182 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1183 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=-0.03, c=-1.96, d=-1.07, tx=200, ty=200)'");
1184 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1185 check_equals(mo, "staticmc._xscale", "-100");
1186 check_equals(mo, "staticmc._rotation", "2");
1187 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'111,167 289,233'");
1189 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1190 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=0.03, c=-2.03, d=-0.93, tx=200, ty=200)'");
1191 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1192 check_equals(mo, "staticmc._xscale", "-100");
1193 check_equals(mo, "staticmc._rotation", "-2");
1194 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'109,171 291,229'");
1197 SWFMovie_nextFrame(mo);
1199 SWFDisplayItem_remove(it);
1200 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1201 SWFDisplayItem_setMatrix(it, 1, 2, 0, 1, 200, 200);
1202 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'169.95,109.85 230.05,290.15'");
1203 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=2, c=0, d=1, tx=200, ty=200)'");
1205 check_equals(mo, "Math.round(staticmc._rotation)", "63");
1206 check_equals(mo, "staticmc._yscale", "100");
1207 check_equals(mo, "Math.round(staticmc._xscale)", "224");
1208 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1209 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=-2, c=0, d=1, tx=200, ty=200)'");
1210 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1211 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,110 230,290'");
1213 check_equals(mo, "Math.round(staticmc._rotation)", "63");
1214 check_equals(mo, "staticmc._yscale", "100");
1215 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1216 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=-2, c=0, d=-1, tx=200, ty=200)'");
1217 check_equals(mo, "staticmc._yscale", "-100");
1218 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1219 check_equals(mo, "Math.round(staticmc._rotation)", "63");
1220 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,110 230,290'");
1222 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1223 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=-0.08, c=-0.88, d=-0.48, tx=200, ty=200)'");
1224 check_equals(mo, "staticmc._yscale", "-100");
1225 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1226 check_equals(mo, "staticmc._rotation", "2");
1227 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'110,180 290,220'");
1229 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1230 check_equals(mo, "printMatrix(staticmc.transform.matrix, 1)", "'(a=-2.2, b=0.1, c=-0.9, d=-0.4, tx=200, ty=200)'");
1231 check_equals(mo, "staticmc._yscale", "-100");
1232 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1233 check_equals(mo, "staticmc._rotation", "-2");
1234 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'110,190 290,210'");
1236 SWFMovie_nextFrame(mo);
1238 SWFDisplayItem_remove(it);
1239 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1240 SWFDisplayItem_setMatrix(it, 1, -2, 0, 1, 200, 200);
1241 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'169.95,109.85 230.05,290.15'");
1242 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=-2, c=0, d=1, tx=200, ty=200)'");
1244 check_equals(mo, "Math.round(staticmc._rotation)", "-63");
1245 check_equals(mo, "staticmc._yscale", "100");
1246 check_equals(mo, "Math.round(staticmc._xscale)", "224");
1247 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1248 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=2, c=0, d=1, tx=200, ty=200)'");
1249 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1250 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,110 230,290'");
1252 check_equals(mo, "Math.round(staticmc._rotation)", "-63");
1253 check_equals(mo, "staticmc._yscale", "100");
1254 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1255 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=2, c=0, d=-1, tx=200, ty=200)'");
1256 check_equals(mo, "staticmc._yscale", "-100");
1257 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1258 check_equals(mo, "Math.round(staticmc._rotation)", "-63");
1259 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,110 230,290'");
1261 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1262 check_equals(mo, "printMatrix(staticmc.transform.matrix, 1)", "'(a=-2.2, b=-0.1, c=0.9, d=-0.4, tx=200, ty=200)'");
1263 check_equals(mo, "staticmc._yscale", "-100");
1264 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1265 check_equals(mo, "staticmc._rotation", "2");
1266 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'110,190 290,210'");
1268 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1269 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=0.08, c=0.88, d=-0.48, tx=200, ty=200)'");
1270 check_equals(mo, "staticmc._yscale", "-100");
1271 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1272 check_equals(mo, "staticmc._rotation", "-2");
1273 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'110,180 290,220'");
1275 SWFMovie_nextFrame(mo);
1277 SWFDisplayItem_remove(it);
1278 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1279 SWFDisplayItem_setMatrix(it, 1, -2, 0, -1, 200, 200);
1280 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'169.95,109.85 230.05,290.15'");
1281 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=-2, c=0, d=-1, tx=200, ty=200)'");
1283 check_equals(mo, "Math.round(staticmc._rotation)", "-63");
1284 check_equals(mo, "staticmc._yscale", "100");
1285 check_equals(mo, "Math.round(staticmc._xscale)", "224");
1286 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1287 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=2, c=0, d=-1, tx=200, ty=200)'");
1288 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1289 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,110 230,290'");
1291 check_equals(mo, "Math.round(staticmc._rotation)", "-63");
1292 check_equals(mo, "staticmc._yscale", "100");
1293 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1294 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=2, c=0, d=1, tx=200, ty=200)'");
1295 check_equals(mo, "staticmc._yscale", "-100");
1296 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1297 check_equals(mo, "Math.round(staticmc._rotation)", "-63");
1298 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,110 230,290'");
1300 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1301 check_equals(mo, "printMatrix(staticmc.transform.matrix, 1)", "'(a=-2.2, b=-0.1, c=-0.9, d=0.4, tx=200, ty=200)'");
1302 check_equals(mo, "staticmc._yscale", "-100");
1303 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1304 check_equals(mo, "staticmc._rotation", "2");
1305 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'110,190 290,210'");
1307 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1308 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=0.08, c=-0.88, d=0.48, tx=200, ty=200)'");
1309 check_equals(mo, "staticmc._yscale", "-100");
1310 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1311 check_equals(mo, "staticmc._rotation", "-2");
1312 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'110,180 290,220'");
1315 SWFMovie_nextFrame(mo);
1317 SWFDisplayItem_remove(it);
1318 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1319 SWFDisplayItem_setMatrix(it, -1, 2, 0, 1, 200, 200);
1320 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'169.95,109.85 230.05,290.15'");
1321 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=2, c=0, d=1, tx=200, ty=200)'");
1323 check_equals(mo, "Math.round(staticmc._rotation)", "117");
1324 check_equals(mo, "staticmc._yscale", "100");
1325 check_equals(mo, "Math.round(staticmc._xscale)", "224");
1326 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1327 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=-2, c=0, d=1, tx=200, ty=200)'");
1328 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1329 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,110 230,290'");
1331 check_equals(mo, "Math.round(staticmc._rotation)", "117");
1332 check_equals(mo, "staticmc._yscale", "100");
1333 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1334 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=-2, c=0, d=-1, tx=200, ty=200)'");
1335 check_equals(mo, "staticmc._yscale", "-100");
1336 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1337 check_equals(mo, "Math.round(staticmc._rotation)", "117");
1338 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,110 230,290'");
1340 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1341 check_equals(mo, "printMatrix(staticmc.transform.matrix, 1)", "'(a=-2.2, b=-0.1, c=-0.9, d=0.4, tx=200, ty=200)'");
1342 check_equals(mo, "staticmc._yscale", "-100");
1343 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1344 check_equals(mo, "staticmc._rotation", "2");
1345 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'110,190 290,210'");
1347 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1348 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=0.08, c=-0.88, d=0.48, tx=200, ty=200)'");
1349 check_equals(mo, "staticmc._yscale", "-100");
1350 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1351 check_equals(mo, "staticmc._rotation", "-2");
1352 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'110,180 290,220'");
1354 SWFMovie_nextFrame(mo);
1356 SWFDisplayItem_remove(it);
1357 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1358 SWFDisplayItem_setMatrix(it, -1, -2, 0, 1, 200, 200);
1359 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'169.95,109.85 230.05,290.15'");
1360 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=-2, c=0, d=1, tx=200, ty=200)'");
1362 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1363 check_equals(mo, "staticmc._yscale", "100");
1364 check_equals(mo, "Math.round(staticmc._xscale)", "224");
1365 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1366 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=2, c=0, d=1, tx=200, ty=200)'");
1367 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1368 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,110 230,290'");
1370 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1371 check_equals(mo, "staticmc._yscale", "100");
1372 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1373 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=2, c=0, d=-1, tx=200, ty=200)'");
1374 check_equals(mo, "staticmc._yscale", "-100");
1375 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1376 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1377 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,110 230,290'");
1379 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1380 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=-0.08, c=0.88, d=0.48, tx=200, ty=200)'");
1381 check_equals(mo, "staticmc._yscale", "-100");
1382 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1383 check_equals(mo, "staticmc._rotation", "2");
1384 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'110,180 290,220'");
1386 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1387 check_equals(mo, "printMatrix(staticmc.transform.matrix, 1)", "'(a=-2.2, b=0.1, c=0.9, d=0.4, tx=200, ty=200)'");
1388 check_equals(mo, "staticmc._yscale", "-100");
1389 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1390 check_equals(mo, "staticmc._rotation", "-2");
1391 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'110,190 290,210'");
1394 SWFMovie_nextFrame(mo);
1396 SWFDisplayItem_remove(it);
1397 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1398 SWFDisplayItem_setMatrix(it, -1, -2, 0, -1, 200, 200);
1399 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'169.95,109.85 230.05,290.15'");
1400 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=-2, c=0, d=-1, tx=200, ty=200)'");
1402 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1403 check_equals(mo, "staticmc._yscale", "100");
1404 check_equals(mo, "Math.round(staticmc._xscale)", "224");
1405 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1406 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=2, c=0, d=-1, tx=200, ty=200)'");
1407 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1408 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,110 230,290'");
1410 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1411 check_equals(mo, "staticmc._yscale", "100");
1412 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1413 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=2, c=0, d=1, tx=200, ty=200)'");
1414 check_equals(mo, "staticmc._yscale", "-100");
1415 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1416 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1417 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'170,110 230,290'");
1419 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1420 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=-0.08, c=-0.88, d=-0.48, tx=200, ty=200)'");
1421 check_equals(mo, "staticmc._yscale", "-100");
1422 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1423 check_equals(mo, "staticmc._rotation", "2");
1424 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'110,180 290,220'");
1426 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1427 check_equals(mo, "printMatrix(staticmc.transform.matrix, 1)", "'(a=-2.2, b=0.1, c=-0.9, d=-0.4, tx=200, ty=200)'");
1428 check_equals(mo, "staticmc._yscale", "-100");
1429 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1430 check_equals(mo, "staticmc._rotation", "-2");
1431 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'110,190 290,210'");
1434 SWFMovie_nextFrame(mo);
1436 SWFDisplayItem_remove(it);
1437 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1438 SWFDisplayItem_setMatrix(it, -1, -2, 2, -1, 200, 200);
1439 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'109.85,109.85 290.15,290.15'");
1440 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=-2, c=2, d=-1, tx=200, ty=200)'");
1442 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1443 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1444 check_equals(mo, "Math.round(staticmc._xscale)", "224");
1445 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1446 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=2, c=2, d=-1, tx=200, ty=200)'");
1447 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1448 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1450 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1451 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1452 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1453 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=2, c=-2, d=1, tx=200, ty=200)'");
1454 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1455 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1456 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1457 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1459 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1460 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=-0.08, c=0.08, d=-2.23, tx=200, ty=200)'");
1461 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1462 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1463 check_equals(mo, "staticmc._rotation", "2");
1464 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'131,131 270,270'");
1466 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1467 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=0.08, c=-0.08, d=-2.23, tx=200, ty=200)'");
1468 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1469 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1470 check_equals(mo, "staticmc._rotation", "-2");
1471 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'131,131 270,270'");
1473 SWFMovie_nextFrame(mo);
1475 SWFDisplayItem_remove(it);
1476 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1477 SWFDisplayItem_setMatrix(it, -1, -2, -2, -1, 200, 200);
1478 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'109.85,109.85 290.15,290.15'");
1479 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=-2, c=-2, d=-1, tx=200, ty=200)'");
1481 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1482 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1483 check_equals(mo, "Math.round(staticmc._xscale)", "224");
1484 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1485 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1486 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1487 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=2, c=-2, d=-1, tx=200, ty=200)'");
1489 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1490 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1491 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1492 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=2, c=2, d=1, tx=200, ty=200)'");
1493 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1494 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1495 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1496 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1498 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1499 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=-0.08, c=-1.83, d=1.28, tx=200, ty=200)'");
1500 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1501 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1502 check_equals(mo, "staticmc._rotation", "2");
1503 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'78,159 322,241'");
1505 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1506 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=0.08, c=-1.74, d=1.4, tx=200, ty=200)'");
1507 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1508 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1509 check_equals(mo, "staticmc._rotation", "-2");
1510 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'80,160 320,240'");
1512 SWFMovie_nextFrame(mo);
1514 SWFDisplayItem_remove(it);
1515 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1516 SWFDisplayItem_setMatrix(it, -1, 2, -2, -1, 200, 200);
1517 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'109.85,109.85 290.15,290.15'");
1518 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=2, c=-2, d=-1, tx=200, ty=200)'");
1520 check_equals(mo, "Math.round(staticmc._rotation)", "117");
1521 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1522 check_equals(mo, "Math.round(staticmc._xscale)", "224");
1523 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1524 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=-2, c=-2, d=-1, tx=200, ty=200)'");
1525 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1526 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1528 check_equals(mo, "Math.round(staticmc._rotation)", "117");
1529 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1530 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1531 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=-2, c=2, d=1, tx=200, ty=200)'");
1532 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1533 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1534 check_equals(mo, "Math.round(staticmc._rotation)", "117");
1535 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1537 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1538 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=-0.08, c=0.08, d=-2.23, tx=200, ty=200)'");
1539 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1540 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1541 check_equals(mo, "staticmc._rotation", "2");
1542 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'131,131 270,270'");
1544 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1545 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=0.08, c=-0.08, d=-2.23, tx=200, ty=200)'");
1546 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1547 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1548 check_equals(mo, "staticmc._rotation", "-2");
1549 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'131,131 270,270'");
1551 SWFMovie_nextFrame(mo);
1553 SWFDisplayItem_remove(it);
1554 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1555 SWFDisplayItem_setMatrix(it, -1, 2, -2, 1, 200, 200);
1556 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'109.85,109.85 290.15,290.15'");
1557 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=2, c=-2, d=1, tx=200, ty=200)'");
1559 check_equals(mo, "Math.round(staticmc._rotation)", "117");
1560 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1561 check_equals(mo, "Math.round(staticmc._xscale)", "224");
1562 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1563 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=-2, c=-2, d=1, tx=200, ty=200)'");
1564 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1565 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1567 check_equals(mo, "Math.round(staticmc._rotation)", "117");
1568 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1569 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1570 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=-2, c=2, d=-1, tx=200, ty=200)'");
1571 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1572 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1573 check_equals(mo, "Math.round(staticmc._rotation)", "117");
1574 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1576 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1577 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=-0.08, c=-1.74, d=-1.4, tx=200, ty=200)'");
1578 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1579 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1580 check_equals(mo, "staticmc._rotation", "2");
1581 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'80,160 320,240'");
1583 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1584 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=0.08, c=-1.83, d=-1.28, tx=200, ty=200)'");
1585 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1586 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1587 check_equals(mo, "staticmc._rotation", "-2");
1588 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'78,159 322,241'");
1591 SWFMovie_nextFrame(mo);
1593 SWFDisplayItem_remove(it);
1594 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1595 SWFDisplayItem_setMatrix(it, 1, 2, -2, -1, 200, 200);
1596 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'109.85,109.85 290.15,290.15'");
1597 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=2, c=-2, d=-1, tx=200, ty=200)'");
1599 check_equals(mo, "Math.round(staticmc._rotation)", "63");
1600 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1601 check_equals(mo, "Math.round(staticmc._xscale)", "224");
1602 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1603 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=-2, c=-2, d=-1, tx=200, ty=200)'");
1604 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1605 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1607 check_equals(mo, "Math.round(staticmc._rotation)", "63");
1608 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1609 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1610 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=-2, c=2, d=1, tx=200, ty=200)'");
1611 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1612 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1613 check_equals(mo, "Math.round(staticmc._rotation)", "63");
1614 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1616 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1617 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=-0.08, c=1.83, d=-1.28, tx=200, ty=200)'");
1618 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1619 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1620 check_equals(mo, "staticmc._rotation", "2");
1621 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'78,159 322,241'");
1623 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1624 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=0.08, c=1.74, d=-1.4, tx=200, ty=200)'");
1625 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1626 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1627 check_equals(mo, "staticmc._rotation", "-2");
1628 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'80,160 320,240'");
1630 SWFMovie_nextFrame(mo);
1632 SWFDisplayItem_remove(it);
1633 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1634 SWFDisplayItem_setMatrix(it, -1, -2, 2, -1, 200, 200);
1635 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'109.85,109.85 290.15,290.15'");
1636 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=-2, c=2, d=-1, tx=200, ty=200)'");
1638 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1639 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1640 check_equals(mo, "Math.round(staticmc._xscale)", "224");
1641 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1642 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=2, c=2, d=-1, tx=200, ty=200)'");
1643 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1644 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1646 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1647 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1648 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1649 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=2, c=-2, d=1, tx=200, ty=200)'");
1650 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1651 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1652 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1653 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1655 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1656 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=-0.08, c=0.08, d=-2.23, tx=200, ty=200)'");
1657 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1658 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1659 check_equals(mo, "staticmc._rotation", "2");
1660 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'131,131 270,270'");
1662 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1663 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=0.08, c=-0.08, d=-2.23, tx=200, ty=200)'");
1664 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1665 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1666 check_equals(mo, "staticmc._rotation", "-2");
1667 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'131,131 270,270'");
1670 SWFMovie_nextFrame(mo);
1672 SWFDisplayItem_remove(it);
1673 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1674 SWFDisplayItem_setMatrix(it, -1, -2, 2, 1, 200, 200);
1675 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'109.85,109.85 290.15,290.15'");
1676 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-1, b=-2, c=2, d=1, tx=200, ty=200)'");
1678 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1679 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1680 check_equals(mo, "Math.round(staticmc._xscale)", "224");
1681 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1682 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=2, c=2, d=1, tx=200, ty=200)'"); // swaps a,b signs
1683 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1684 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1686 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1687 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1688 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1689 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=2, c=-2, d=-1, tx=200, ty=200)'"); // swaps c,d signs
1690 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1691 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1692 check_equals(mo, "Math.round(staticmc._rotation)", "-117");
1693 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1695 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1696 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=-0.08, c=1.83, d=-1.28, tx=200, ty=200)'");
1697 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1698 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1699 check_equals(mo, "staticmc._rotation", "2");
1700 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'78,159 322,241'");
1702 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1703 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=0.08, c=1.74, d=-1.4, tx=200, ty=200)'");
1704 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1705 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1706 check_equals(mo, "staticmc._rotation", "-2");
1707 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'80,160 320,240'");
1709 SWFMovie_nextFrame(mo);
1711 SWFDisplayItem_remove(it);
1712 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1713 SWFDisplayItem_setMatrix(it, 1, -2, 2, -1, 200, 200);
1714 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'109.85,109.85 290.15,290.15'");
1715 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=-2, c=2, d=-1, tx=200, ty=200)'");
1717 check_equals(mo, "Math.round(staticmc._rotation)", "-63");
1718 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1719 check_equals(mo, "Math.round(staticmc._xscale)", "224");
1720 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;"); // swap _xscale sign using ActionScript
1721 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=2, c=2, d=-1, tx=200, ty=200)'");
1722 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1723 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1725 check_equals(mo, "Math.round(staticmc._rotation)", "-63");
1726 check_equals(mo, "Math.round(staticmc._yscale)", "224");
1727 add_actions(mo, "staticmc._yscale = 0 - staticmc._yscale;"); // swap _yscale sign using ActionScript
1728 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=2, c=-2, d=1, tx=200, ty=200)'");
1729 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1730 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1731 check_equals(mo, "Math.round(staticmc._rotation)", "-63");
1732 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'110,110 290,290'");
1734 add_actions(mo, "staticmc._rotation = 2;"); // change _rotation using ActionScript
1735 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=-0.08, c=-1.74, d=-1.4, tx=200, ty=200)'");
1736 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1737 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1738 check_equals(mo, "staticmc._rotation", "2");
1739 check_equals(mo, "printBounds(staticmc.getBounds(_root), -1)", "'80,160 320,240'");
1741 add_actions(mo, "staticmc._rotation = -2;"); // change _rotation using ActionScript
1742 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-2.23, b=0.08, c=-1.83, d=-1.28, tx=200, ty=200)'");
1743 check_equals(mo, "Math.round(staticmc._yscale)", "-224");
1744 check_equals(mo, "Math.round(staticmc._xscale)", "-224");
1745 check_equals(mo, "staticmc._rotation", "-2");
1746 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'78,159 322,241'");
1748 SWFMovie_nextFrame(mo);
1750 // This is a matrix found in the mario.swf movie (bug #24280)
1752 // Matrix:
1753 // ScaleX 0.000000 ScaleY 0.000000
1754 // RotateSkew0 0.972519 RotateSkew1 -1.000000
1755 // TranslateX 279 TranslateY 4296
1757 // Actually this ming version omits ScaleX and ScaleY
1758 // (hasScale flag clear). I hope it doesn't count!
1760 SWFDisplayItem_remove(it);
1761 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1762 SWFMovie_nextFrame(mo);
1763 SWFDisplayItem_setMatrix(it, 0, 0.972519, -1, 0, 13.950, 214.80);
1764 check_equals(mo, "Math.round(staticmc._x*100)/100", "13.95");
1765 check_equals(mo, "staticmc._y", "214.80");
1767 // Ming 0.4.2 (aka 0.4.0-rc2) omits the scales rather then set them to zero
1768 #if MING_VERSION_CODE <= 40200
1769 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=1, b=0.97, c=-1, d=1, tx=13.95, ty=214.8)'");
1770 check_equals(mo, "Math.round(staticmc._xscale)", "139");
1771 check_equals(mo, "Math.round(staticmc._yscale)", "141");
1772 check_equals(mo, "Math.round(staticmc._rotation)", "44");
1773 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'-46,156 74,274'");
1774 #else
1775 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=0, b=0.97, c=-1, d=0, tx=13.95, ty=214.8)'");
1776 check_equals(mo, "Math.round(staticmc._xscale)", "97");
1777 check_equals(mo, "Math.round(staticmc._yscale)", "100");
1778 check_equals(mo, "Math.round(staticmc._rotation)", "90");
1779 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'-16,186 44,244'");
1780 #endif
1782 // swap _xscale sign using ActionScript
1783 add_actions(mo, "staticmc._xscale = 0 - staticmc._xscale;");
1784 check_equals(mo, "Math.round(staticmc._x*100)/100", "13.95");
1785 check_equals(mo, "staticmc._y", "214.80");
1787 // Ming 0.4.2 (aka 0.4.0-rc2) omits the scales rather then set them to zero
1788 #if MING_VERSION_CODE <= 40200
1789 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=-1, b=-0.97, c=-1, d=1, tx=13.95, ty=214.8)'");
1790 check_equals(mo, "Math.round(staticmc._xscale)", "-139");
1791 check_equals(mo, "Math.round(staticmc._yscale)", "141");
1792 check_equals(mo, "Math.round(staticmc._rotation)", "44");
1793 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'-46,156 74,274'");
1794 #else
1795 check_equals(mo, "printMatrix(staticmc.transform.matrix, 2)", "'(a=0, b=-0.97, c=-1, d=0, tx=13.95, ty=214.8)'");
1796 check_equals(mo, "Math.round(staticmc._xscale)", "-97");
1797 check_equals(mo, "Math.round(staticmc._yscale)", "100");
1798 check_equals(mo, "Math.round(staticmc._rotation)", "90");
1799 check_equals(mo, "printBounds(staticmc.getBounds(_root), 0)", "'-16,186 44,244'");
1800 #endif
1802 SWFMovie_nextFrame(mo);
1803 SWFDisplayItem_remove(it);
1804 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1805 SWFDisplayItem_setMatrix(it, 1, 0, 0, 1, 0, 0);
1806 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-30.05,-30.05 30.05,30.05'");
1807 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=0, d=1, tx=0, ty=0)'");
1808 check_equals(mo, "staticmc._rotation", "0");
1809 check_equals(mo, "staticmc._xscale", "100");
1810 check_equals(mo, "staticmc._yscale", "100");
1812 add_actions(mo, "staticmc._yscale = -200;"); // change _yscale using ActionScript
1813 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-30.05,-60.1 30.05,60.1'");
1814 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=0, d=-2, tx=0, ty=0)'");
1815 check_equals(mo, "staticmc._rotation", "0");
1816 check_equals(mo, "staticmc._xscale", "100");
1817 check_equals(mo, "staticmc._yscale", "-200");
1819 add_actions(mo, "staticmc._rotation = -90;"); // change _rotation using ActionScript
1820 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-60.1,-30.05 60.1,30.05'");
1821 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=0, b=-1, c=-2, d=0, tx=0, ty=0)'");
1822 check_equals(mo, "staticmc._rotation", "-90");
1823 check_equals(mo, "staticmc._xscale", "100");
1824 check_equals(mo, "staticmc._yscale", "-200");
1826 add_actions(mo, "staticmc._rotation = 90;"); // change _rotation using ActionScript
1827 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-60.1,-30.05 60.1,30.05'");
1828 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=0, b=1, c=2, d=0, tx=0, ty=0)'");
1829 check_equals(mo, "staticmc._rotation", "90");
1830 check_equals(mo, "staticmc._xscale", "100");
1831 check_equals(mo, "staticmc._yscale", "-200");
1833 SWFMovie_nextFrame(mo);
1834 SWFDisplayItem_remove(it);
1835 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1836 SWFDisplayItem_setMatrix(it, 1, 0, 0, -2, 0, 0);
1837 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-30.05,-60.1 30.05,60.1'");
1838 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=0, d=-2, tx=0, ty=0)'");
1839 check_equals(mo, "staticmc._rotation", "0");
1840 check_equals(mo, "staticmc._xscale", "100");
1841 check_equals(mo, "staticmc._yscale", "200");
1843 add_actions(mo, "staticmc._rotation = -90;"); // change _rotation using ActionScript
1844 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-60.1,-30.05 60.1,30.05'");
1845 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=0, b=-1, c=-2, d=0, tx=0, ty=0)'");
1846 check_equals(mo, "staticmc._rotation", "-90");
1847 check_equals(mo, "staticmc._xscale", "100");
1848 check_equals(mo, "staticmc._yscale", "200");
1850 add_actions(mo, "staticmc._rotation = 90;"); // change _rotation using ActionScript
1851 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-60.1,-30.05 60.1,30.05'");
1852 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=0, b=1, c=2, d=0, tx=0, ty=0)'");
1853 check_equals(mo, "staticmc._rotation", "90");
1854 check_equals(mo, "staticmc._xscale", "100");
1855 check_equals(mo, "staticmc._yscale", "200");
1857 SWFMovie_nextFrame(mo);
1858 SWFDisplayItem_remove(it);
1859 it = add_static_mc(mo, "staticmc", 4, 0, 0, 60, 60);
1860 SWFDisplayItem_setMatrix(it, 1, 0, 0, 1, 0, 0);
1861 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-30.05,-30.05 30.05,30.05'");
1862 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=1, b=0, c=0, d=1, tx=0, ty=0)'");
1863 check_equals(mo, "staticmc._rotation", "0");
1864 check_equals(mo, "staticmc._xscale", "100");
1865 check_equals(mo, "staticmc._yscale", "100");
1867 add_actions(mo, "staticmc._xscale = -200;"); // change _yscale using ActionScript
1868 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-60.1,-30.05 60.1,30.05'");
1869 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=-2, b=0, c=0, d=1, tx=0, ty=0)'");
1870 check_equals(mo, "staticmc._rotation", "0");
1871 check_equals(mo, "staticmc._xscale", "-200");
1872 check_equals(mo, "staticmc._yscale", "100");
1874 add_actions(mo, "staticmc._rotation = -90;"); // change _rotation using ActionScript
1875 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-30.05,-60.1 30.05,60.1'");
1876 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=0, b=2, c=1, d=0, tx=0, ty=0)'");
1877 check_equals(mo, "staticmc._rotation", "-90");
1878 check_equals(mo, "staticmc._xscale", "-200");
1879 check_equals(mo, "staticmc._yscale", "100");
1881 add_actions(mo, "staticmc._rotation = 90;"); // change _rotation using ActionScript
1882 check_equals(mo, "printBounds(staticmc.getBounds(_root))", "'-30.05,-60.1 30.05,60.1'");
1883 check_equals(mo, "staticmc.transform.matrix.toString()", "'(a=0, b=-2, c=-1, d=0, tx=0, ty=0)'");
1884 check_equals(mo, "staticmc._rotation", "90");
1885 check_equals(mo, "staticmc._xscale", "-200");
1886 check_equals(mo, "staticmc._yscale", "100");
1888 SWFMovie_nextFrame(mo);
1890 add_actions(mo, "_root.totals(1083); stop();");
1891 SWFMovie_nextFrame(mo);
1893 //Output movie
1894 puts("Saving " OUTPUT_FILENAME );
1895 SWFMovie_save(mo, OUTPUT_FILENAME);
1897 return 0;