2 Replies Latest reply on Jun 5, 2007 6:18 AM by kglad

    Importing in AS3

    e-zen
      Hi, i´m studying AS3, and in lots of caseswe need to import external classes. Take a simple Loader class, for example:
      import flash.display.Loader;
      import flash.net.URLRequest;

      var request:URLRequest = new URLRequest("img/image1.jpg");
      var loader:Loader = new Loader();
      loader.load(request);
      addChild(loader);

      But if i ommit the import lines, it just works the same:

      var request:URLRequest = new URLRequest("img/image1.jpg");
      var loader:Loader = new Loader();
      loader.load(request);
      addChild(loader);

      Is there a problem in ommiting the import lines?