7 Replies Latest reply on Dec 3, 2014 1:54 PM by Flex harUI

    service in actionscrip

    Michelle5002

      I used the service wizard to create my service and value objects via the web services wsdl.   I created my Datagrid in an mxml file and getting and setting data via the service works fine.   however, I wanted to move the logic to an Action script for reuse.   Especially when I needed a list for combo boxes and not the datagrid.   however, when I moved the code to AS, I get this error:  1046: Type was not found or was not a compile-time constant.   Would someone please show me how to move this to Action Script?

       

      here is the mxml code that works:

       

      <code>

      <fx:Declarations>
         <trucking:Trucking id="trucking"
           fault="Alert.show(serverErrorMessage + event.fault.faultString + '\n' + event.fault.faultDetail)"
           showBusyCursor="true"/>
        
         <s:CallResponder id="getLocationsInventoryResult" result="getLocationsInventoryResult_resultHandler(event)"/>
         <valueObjects:InventoryDTO id="inventoryDTO"/>
         <s:CallResponder id="setInventoryResult" result="setInventoryResult_resultHandler(event)"/>
        

       

      </code>

       

      in AS, I did this which got the error:

       

      import services.trucking.Trucking;

       

      protected var trucking:Trucking = new Trucking();