Accept 13766 as a valid sound duration too (some liblame versions give that number...
[gnash.git] / testsuite / misc-mtasc.all / level5.as
blobdc5588b7b2e2cb528188b37f2e2fd765cf6c5f9a
1 // level5.as - Data file for the levels.as test
2 //
3 // Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software
4 // Foundation, Inc
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 3 of the License, or
9 // (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 // Original author: David Rorex - drorex@gmail.com
24 #include "check.as"
26 class Level5
28 static function main(mc)
30 check_equals(mc._currentframe, 1);
32 check_equals(_level0.frameno, 1);
34 // Check our depth
35 check_equals(mc.getDepth(), -16379);
37 // The ""+ is there to force conversion to a string
38 check_equals(""+mc, "_level5");
40 // Mc level is _level0 ? why ?
41 check_equals(mc._level, _level0);
43 // check that we can acess back to _level0
44 check_equals(_level0.testvar, 1239);
46 // check that we can modify vars on our own level
47 check_equals(_level5.testvar, undefined);
48 _level5.testvar = 6789;
49 check_equals(_level5.testvar, 6789);
51 // check that we can modify vars on _level0
52 check_equals(_level0.testvar2, undefined);
53 _level0.testvar2 = true;
54 check_equals(_level0.testvar2, true);
56 _level5.onUnload = function()
58 check(false); // should not be executed
59 note("Unloading "+this);
62 mc.createEmptyMovieClip("ch", 1);
63 with(mc.ch)
65 lineStyle(1, 0x00000);
66 beginFill(0xFF0000, 80);
67 var x=200;
68 var y=200;
69 var width=100;
70 var height=100;
71 moveTo(x, y);
72 lineTo(x+width, y);
73 lineTo(x+width, y+height);
74 lineTo(x, y+height);
75 lineTo(x, y);
76 endFill();
79 check_equals(mc.ch._target, "_level5/ch");
81 // load yet another swf
82 getURL("level99.swf","_level"+99);
84 getURL("level87.swf", "_level87");