title: Flex error: type was not found or was not a compile-time constant
body: <p>I get the following error in my flex code.  Any ideas how to solve this?</p>
  
  <p>
  </p>
  
  <pre><code>&lt;mx:Script&gt;
      &lt;![CDATA[
          private function send_data():void {
              userRequest.send();
          }
      ]]&gt;
  &lt;/mx:Script&gt;
  &lt;mx:Form x="22" y="10" width="493"&gt;
      &lt;mx:HBox&gt;
          &lt;mx:Label text="UserId"/&gt;
          &lt;mx:TextInput id="userid"/&gt;
      &lt;/mx:HBox&gt;
      &lt;mx:HBox&gt;
          &lt;mx:Label text="Ip Address"/&gt;
          &lt;mx:TextInput id="ip"/&gt;
      &lt;/mx:HBox&gt;
      &lt;mx:Button label="Submit" click="send_data()"/&gt;
  &lt;/mx:Form&gt;
  &lt;mx:DataGrid id="dgUserRequest" x="22" y="128" dataProvider="{userRequest.lastResult.users.user}"&gt;
      &lt;mx:columns&gt;
          &lt;mx:DataGridColumn headerText="User ID" dataField="userid"/&gt;
          &lt;mx:DataGridColumn headerText="User Name" dataField="ip"/&gt;
      &lt;/mx:columns&gt;
  &lt;/mx:DataGrid&gt;
  &lt;mx:TextInput x="22" y="292" id="selectedemailaddress"
      text="{dgUserRequest.selectedItem.emailaddress}"/&gt;
  &lt;mx:HTTPService id="userRequest" url="http://localhost/post.php" useProxy="false" method="POST" resultFormat="e4x"&gt;
      &lt;mx:request xmlns=""&gt;
          &lt;userid&gt;{userid.text}&lt;/userid&gt;
          &lt;ipaddress&gt;{ip.text}&lt;/ipaddress&gt;
      &lt;/mx:request&gt;
  &lt;/mx:HTTPService&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>Type was not found or was not a compile-time constant: data.
  [Generated code (use -keep to save): Path: data-generated.as, Line: 245, Column: 14]
  </code></pre>