2 Replies Latest reply on Dec 21, 2009 1:16 PM by Niro_kal

    passing array from coldfuison to as3


      hay all

      im new at CF and i'm traying to pass an array (list of languages form mySql) aealy simple one, my function looks like that:



      <cffunction name="get_languages_pagingUtils" access="remote" returntype="Array" >

      <cfset var arrResult = arrayNew( 1 ) >

      <cfquery name="languages">

      SELECT language_name,native_name

      FROM languages


      <cfreturn arrResult>




      on the as3 side i have this:

      the function that call the old fusion function-


      public static function getData():void


      var nc:NetConnection;

      nc = new NetConnection();


      nc.call("paging-debug.cfc.pagingService.get_languages_pagingUtils", new Responder(onResult, onError));



      and the result function:


      public static  function onResult(result:Array):void


      trace("result = ", result as Array)



      i have tray to find all kind of tutorials but no success there..

      i'll be happy for sum halp


        • 1. Re: passing array from coldfuison to as3

          This is not the best place to post this, but I hope this helps.


          You can use a simple remote object for this.





                  endpoint="http://localhost:8500/flashservices/gateway/" (try this insead http://localhost:8500/flex2gateway/)
                  <mx:method name="get_languages_pagingUtils" result="onResult(event)" />   




          your actionscript


          import mx.rpc.events.ResultEvent;

          import mx.utils.ObjectUtil;


          public function getData():void{




          private function onResult(event:ResultEvent):void{



          • 2. Re: passing array from coldfuison to as3
            Niro_kal Level 1

            thanks for your answer..

            i thought that it's not the place for it..

            but any way this is steel not helping me cose im trying to pass the array to

            a class and not to flex - (when i'm dooing it in flex its all good just like you say)


            thanks again.