add blend mode tests
[swfdec.git] / test / image / duplicateMovieClip-drawingstate.as
bloba03147472d5104a78fda02cbde3532e76bf835f3
1 // makeswf -v 7 -s 200x150 -r 1 -o duplicateMovieClip-drawingstate.swf duplicateMovieClip-drawingstate.as
3 #if __SWF_VERSION__ == 6
4 depth = 0;
5 getNextHighestDepth = function () {
6 return depth++;
7 };
8 #endif
10 rectangle_start = function (mc, x, y, w, h)
12 mc.moveTo (x, y);
13 mc.lineTo (x, y + h);
14 mc.lineTo (x + w, y + h);
17 rectangle_end = function (mc, x, y, w, h)
19 mc.lineTo (x + w, y);
20 mc.lineTo (x, y);
21 mc.endFill ();
24 test_count = 0;
25 test = function (fun) {
26 var x = createEmptyMovieClip ("a" + getNextHighestDepth (), getNextHighestDepth ());
27 fun (x);
28 x._x = (test_count % 2) * 100;
29 x._y = int (test_count / 2) * 50;
30 rectangle_start (x, 0, 0, 50, 50);
31 y = x.duplicateMovieClip ("b" + getNextHighestDepth (), getNextHighestDepth ());
32 y._x += 50;
33 if (test_count % 2)
34 y = x;
35 trace (y);
36 rectangle_end (y, 0, 0, 50, 50);
37 test_count++;
40 test (function (mc) { m = new flash.geom.Matrix (); m.createGradientBox (50, 50);
41 mc.beginGradientFill ("radial", [0xFF0000, 0xFF00], [100, 100], [0, 255], m); });
42 test (function (mc) { bd = new flash.display.BitmapData (50, 50, false, 0xFF0000); mc.beginBitmapFill (bd); });
43 test (function (mc) { mc.beginFill (0xFF); });