-
Notifications
You must be signed in to change notification settings - Fork 20
/
Main.as
50 lines (40 loc) · 1.14 KB
/
Main.as
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package {
import flash.display.Sprite;
import flash.text.TextField;
public class Main extends Sprite {
public function Main() {
var textField = new TextField()
textField.text = "Hello, World"
addChild(textField)
// easy type resolving
var integerNumber = 1
var floatNumber = 3.1415
var text = "test"
var booleanValue = true
// hard type resolving
var transformObject = transform
var matrix = transformObject.matrix;
var a = matrix.a
var compareValues = integerNumber > 1 && floatNumber < 1
var numberValue = integerNumber / floatNumber;
var stringValue = integerNumber * floatNumber + text;
var summValue = summ(1, 2, 3);
log(compareValues);
log(numberValue);
log(stringValue);
log(summValue);
}
function log(object)
{
var output = getChildAt(0)
output.appendText("\n" + object)
}
function summ(a, b, c)
{
var aa:Number = a
var bb = b + 1;
var cc = c * c
return aa + bb + cc
}
}
}