Mega Code Archive

 
Categories / Flash ActionScript / Language
 

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);             }         }     } }