Flash / Flex / ActionScript/Language/import — различия между версиями

Материал из Web эксперт
Перейти к: навигация, поиск
м (1 версия)
 
м (1 версия)
 
(нет различий)

Текущая версия на 08:15, 26 мая 2010

Importing a class makes that class available to the code in the file and sets up a shortcut.

 
package {
    import flash.display.Sprite;
    public class ExampleApplication extends Sprite {
        public function ExampleApplication(  ) {
            graphics.lineStyle(1, 0, 1);
            for(var i:int=0;i<100;i++) {
                graphics.lineTo(Math.random(  ) * 400, Math.random(  ) * 400);
            }
        }
    }
}