release 0.5.4
[swfdec.git] / test / trace / super-existance.as
blob3ef47c87bc41b868842c416e6b36dc246ac0d8fa
1 // makeswf -v 7 -s 200x150 -r 1 -o movie23.swf movie23.as
3 trace (super);
4 fuz = function () {
5 trace ("fuz");
6 };
7 foo = function () extends fuz {
8 trace ("foo");
9 trace (super);
10 trace (super.toString);
11 super ();
13 bar = function () extends foo {
14 trace ("bar");
15 trace (super);
16 if (huh) {
17 asm {
18 push 0, "huh"
19 getvariable
20 push undefined
21 callmethod
24 huh = super;
25 asm {
26 push 0, "super"
27 callfunction
28 pop
29 push 0, "super"
30 getvariable
31 push undefined
32 callmethod
33 pop
36 function call_huh () {
37 trace ("calling last function's super object: " + huh);
38 huh ();
41 trace (">>> CallFunction bar ()");
42 bar ();
43 call_huh ();
44 trace (">>> CallMethod bar ()");
45 asm {
46 push 0, "super"
47 getvariable
48 push undefined
49 callmethod
50 pop
52 call_huh ();
53 trace (">>> this.bar ()");
54 this.bar ();
55 call_huh ();
56 trace (">>> new bar ()");
57 x = new bar ();
58 call_huh ();
59 trace (">>> new this.bar ()");
60 x = new this.bar ();
61 call_huh ();
63 loadMovie ("fscommand:quit", "");