1 // makeswf -v 7 -r 1 -o textformat-7.swf textformat.as
26 var tester_counter
= 0;
27 var tester
= new Object ();
29 tester
.valueOf
= function () {
31 trace
("valueOf: " + tester_counter
);
32 return tester_counter
;
35 tester
.toString
= function () {
37 trace
("toString: " + tester_counter
);
38 return "toString_" + tester_counter
;
42 var fmt
= new TextFormat();
44 for (var i
= 0; i
< properties
.length
; i
++) {
45 var prop
= properties
[i
];
46 trace
("Testing: " + prop
);
52 var align_tester_counter
= 0;
53 var align_tester
= new Object ();
55 align_tester
.toString
= function () {
56 align_tester_counter
++;
57 trace
("aling_toString: " + align_tester_counter
);
58 if (align_tester_counter
% 4 == 0) {
60 } else if (align_tester_counter
% 3 == 0) {
62 } else if (align_tester_counter
% 2 == 0) {
69 trace
("Testing align:");
70 for (var i
= 0; i
< 5; i
++) {
71 fmt
["align"] = align_tester
;
76 var display_tester_counter
= 0;
77 var display_tester
= new Object ();
79 display_tester
.toString
= function () {
80 display_tester_counter
++;
81 trace
("display_toString: " + display_tester_counter
);
82 if (display_tester_counter
% 3 == 0) {
84 } else if (display_tester_counter
% 2 == 0) {
91 trace
("Testing display:");
92 for (var i
= 0; i
< 5; i
++) {
93 fmt
["display"] = display_tester
;
94 trace
(fmt
["display"]);
98 loadMovie
("FSCommand:quit", "");