title: AS3 - How to import a class file?
body: <p>I'm a newbie to Adobe Flash CS 6 and ActionScript 3.0 (AS3). I have difficulties trying to understand how to include a class file into my project. </p>
  
  <p>The problem is, I want to add a class file (.as) into my flash project (.fla). They are in the same folder with my project file (Courseware.fla and Courseware.as). Among the things that I have tried is:</p>
  
  <p>On flash project:</p>
  
  <pre><code>import com.example;
  </code></pre>
  
  <p>On class file:</p>
  
  <pre><code>package com.example
  {
      public class Test
      {
          public function display():void
          {
              trace("here");
          }
      }
  }
  </code></pre>
  
  <p>But however, I received this error:</p>
  
  <pre><code>Scene 1, Layer 'Master Frame', Frame 1, Line 1  1172: Definition com:example could not be found.
  </code></pre>
  
  <p>I'm clueless on how to fix this error. Can someone guide me on how to create and import class properly into a flash project? Thank you!</p>