1 addEventListener(Event.ENTER_FRAME, onEF);
2 var rt:* = root;
3 var mc:Sprite = new Sprite()
4 mc.graphics.beginFill(0xff0000, 1);
5 mc.graphics.drawRect(0, 0, 100, 100);
6 mc.graphics.endFill();
7 addChild(mc)
8
9 function onEF(e:Event)
10 {
11 with (rt)
12 {
13 rt.x++;
14 rt.y++;
15 }
16 trace(mc.x)
17 }
2 var rt:* = root;
3 var mc:Sprite = new Sprite()
4 mc.graphics.beginFill(0xff0000, 1);
5 mc.graphics.drawRect(0, 0, 100, 100);
6 mc.graphics.endFill();
7 addChild(mc)
8
9 function onEF(e:Event)
10 {
11 with (rt)
12 {
13 rt.x++;
14 rt.y++;
15 }
16 trace(mc.x)
17 }