title: Using Flash Component SWC file in Flex
body: <p>I am accessing custom UIComponent via SWC file from Flex 3. 
  This component works OK in Flash CS3, but using it from Flex gives A weird error in draw().</p>
  
  <p>I have added swc component inside Sprite (with addchild) and its in LIB path. </p>
  
  <p>TypeError: Error #1010: A term is undefined and has no properties.</p>
  
  <pre><code>at com.xxxx.highscores::HighScores/draw()
  
  at fl.core::UIComponent/callLaterDispatcher()
  </code></pre>
  
  <p>Here is the draw() function of this UI Component:</p>
  
  <p>override protected function draw():void {
           isInitializing = false;</p>
  
  <pre><code>     page.Text.x = width / 2;
       page.Text.y = height / 2;
  
       drawBackground();
  </code></pre>
  
  <p>}</p>