remove "*&val" references
[swfdec.git] / test / trace / super-calls.as
blob63911288de638dfb9fa5a4897e44951b885db247
1 // makeswf -v 7 -s 200x150 -r 1 -o super-calls.swf super-calls.as
3 trace ("Check various behaviours of the super object");
5 function One () {
6 trace (1);
7 };
8 function Two () {
9 super ();
10 trace (2);
12 function Three () {
13 super ();
14 trace (3);
16 #if __SWF_VERSION__ <= 5
17 Two.prototype = new Object();
18 Two.prototype.__proto__ = One.prototype;
19 Two.prototype.__constructor__ = One;
20 Three.prototype = new Object();
21 Three.prototype.__proto__ = Two.prototype;
22 Three.prototype.__constructor__ = Two;
23 #else
24 asm {
25 push "Two"
26 getvariable
27 push "One"
28 getvariable
29 extends
31 asm {
32 push "Three"
33 getvariable
34 push "Two"
35 getvariable
36 extends
38 #endif
39 One.prototype.foo = function () {
40 trace ("foo: 1");
42 Two.prototype.foo = function () {
43 super.foo ();
44 trace ("foo: 2");
46 Three.prototype.foo = function () {
47 super.foo (this);
48 trace ("foo: 3");
50 x = new Three ();
51 x.foo ();
52 x.foo.call (this);
53 Three.prototype.foo ();
55 loadMovie ("FSCommand:quit", "");