added kerning support to record device
[swftools.git] / lib / as3 / ok / packagestr.as
1 package {
2     import flash.display.MovieClip
3     import flash.utils.*
4
5     public class Main extends flash.display.MovieClip {
6         function Main() {
7             /* static class member, with full path */
8             var x:String = flash.events.DataEvent.DATA;
9             if(x == "data")
10                 trace("ok 1/4");
11
12             /* This definition makes the below fail for as3compile, while
13                it still works in Flex.
14             var flash:Object = new Object();
15             flash["events"] = new Object();*/
16
17             import flash.events.DataEvent
18             //trace(flash.events); should fail
19
20             /* class, with full path */
21             var y = new flash.events.DataEvent("");
22             if(y is flash.events.Event)
23                 trace("ok 2/4");
24
25             /* package variable, with full path */
26             var z = flash.utils.flash_proxy;
27             if(z is Namespace)
28                 trace("ok 3/4");
29
30             /* package method, with full path */
31             var t = flash.utils.getTimer();
32             if(t is int)
33                 trace("ok 4/4");
34
35             trace("[exit]");
36         }
37         function test2() {
38             /* this test breaks in Flex */
39             var flash:Object = new Object();
40             flash["events"] = new Object();
41             trace(flash.events); //should work- no active import
42         }
43     }
44 }