1 // makeswf -v 7 -r 1 -o native-run-7.swf native-run.as
3 trace
("Running all native functions to find crashes");
4 trace
("Using undefined, movieclip, object and number as this");
6 // FIXME: List is not complete, check when implemting new native functions
7 var native_functions
= [
8 [4,0], [4,1], [5,0], [5,1], [11,0], [100,0], [100,1], [100,2], [100,3],
9 [100,5], [101,0], [101,1], [101,10], [101,11], [101,12], [101,2], [101,3],
10 [101,4], [101,5], [101,6], [101,7], [101,8], [103,0], [103,1], [103,10],
11 [103,11], [103,12], [103,128], [103,13], [103,14], [103,15], [103,16],
12 [103,17], [103,18], [103,19], [103,2], [103,20], [103,257], [103,3], [103,4],
13 [103,5], [103,6], [103,7], [103,8], [103,9], [104,0], [104,101], [104,102],
14 [104,103], [104,104], [104,105], [104,106], [104,107], [104,200], [104,201],
15 [106,0], [106,1], [107,0], [107,1], [111,0], [111,100], [111,101], [111,102],
16 [112,100], [112,101], [112,102], [113,100], [113,101], [113,102], [113,103],
17 [200,0], [200,1], [200,10], [200,11], [200,12], [200,13], [200,14], [200,15],
18 [200,16], [200,17], [200,18], [200,19], [200,2], [200,3], [200,4], [200,5],
19 [200,6], [200,7], [200,8], [200,9], [250,0], [250,1], [250,2], [251,1],
20 [251,10], [251,11], [251,12], [251,13], [251,14], [251,2], [251,3], [251,4],
21 [251,5], [251,6], [251,7], [251,8], [251,9], [252,1], [252,10], [252,11],
22 [252,12], [252,2], [252,3], [252,4], [252,5], [252,6], [252,7], [252,8],
23 [252,9], [253,1], [253,10], [253,11], [253,12], [253,2], [253,3], [253,4],
24 [253,5], [253,6], [253,7], [253,8], [301,0], [301,2], [301,3], [400,0],
25 [400,1], [400,2], [500,6], [500,7], [500,8], [600,0], [600,1], [600,2],
26 [600,3], [600,4], [600,5], [666,1], [666,2], [666,3], [666,4], [666,5],
27 [666,6], [666,7], [666,8], [700,0], [700,1], [700,2], [700,3], [800,0],
28 [800,1], [800,2], [900,0],
29 /* swapDepths: [900,1], */
30 [900,10], [900,12], [900,13], [900,14], [900,15], [900,16], [900,17],
31 [900,18], [900,19], [900,20], [900,21], [900,4], [900,5], [900,6], [900,7],
32 [901,0], [901,1], [901,2], [901,3], [901,4], [901,5], [901,6], [901,7],
33 [901,8], [1067,0], [1067,1], [1067,2], [1067,3], [1067,4], [1067,5],
34 [1067,6], [1067,7], [1067,8], [1067,9], [1112,1], [1999,0], [1999,1],
35 [1999,2], [2102,0], [2102,1], [2102,2],
36 /* Camera: */ [2102,200], [2102,201],
37 [2102,3], [2102,4], [2102,5], [2104,0], [2104,1], [2104,2], [2104,200],
38 [2104,201], [2104,3], [2150,0], [2150,1], [2150,10], [2150,11], [2150,2],
39 [2150,3], [2150,4], [2150,5], [2200,0], [2200,1], [2200,2], [2200,3],
40 [2204,0], [2204,1], [2204,2], [2204,200], [2204,3], [2205,0]
43 for (var i
= 0; i
< native_functions
.length
; i
++) {
44 var o
= new Object ();
45 var n
= new Number ();
46 var func
= ASnative
(native_functions
[i
][0], native_functions
[i
][1]);
51 for (var j
= 0; j
< 10; j
++) {
53 func
.apply
(this, args
);
54 o
.func
.apply
(this, args
);
55 n
.func
.apply
(this, args
);
58 // this way the function is called with this being undefined
60 setTimeout
(func
, 0, 1);
61 setTimeout
(func
, 0, 1, 2);
62 setTimeout
(func
, 0, 1, 2, 3);
63 setTimeout
(func
, 0, 1, 2, 3, 4);
64 setTimeout
(func
, 0, 1, 2, 3, 4, 5);
69 loadMovie
("FSCommand:quit", "");