git.asbjorn.biz
/
swftools.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
added kerning support to record device
[swftools.git]
/
lib
/
as3
/
ok
/
vars.as
1
package {
2
import flash.display.MovieClip;
3
public class Main extends flash.display.MovieClip {
4
5
function test_overload() {
6
var x = 3;
7
if(true) {
8
var x = 4;
9
var y = 5;
10
}
11
if( x == 4 //flex logic
12
|| x == 3 //as3compile logic
13
)
14
trace("ok 1/3");
15
16
if(y==5)
17
trace("ok 2/3");
18
}
19
20
function test_global() {
21
var l = 0;
22
do {
23
var g:int = l++;
24
} while(g<10);
25
if(l==11) {
26
trace("ok 3/3");
27
} else {
28
trace("error 3/3");
29
}
30
}
31
32
function Main() {
33
34
test_overload();
35
test_global();
36
37
trace("[exit]");
38
}
39
}
40
}