1 Reply Latest reply on Jul 22, 2009 11:55 AM by BosDog

    Flashbuilder and Cold Fusion  (using application/session variables)

    popster Level 1

      I would like to know if anybody uses Flashbuilder with Cold Fusion?

       

      Since Cold Fusion has lots of different scopes of variables (application, session, client, form, url, etc...) how do you manage this in Flex/Flashbuilder?

       

      Are there forums or groups specifically for using Flex3/Flashbuilder with backend server side technologies such as Cold Fusion?.

       

      The only server side technology that I have interest in is Cold Fusion.  I've seen basic tutorials and videos using Cold Fusion CFC's and data binding with Flex.  I haven't seen or heard anything using a Cold Fusion application, session, or client variable in Flex.

       

      Hopefully some of you have some experience on this topic.

       

      Thanks

        • 1. Re: Flashbuilder and Cold Fusion  (using application/session variables)
          BosDog

          hey popster,

          i too had this question some time ago. my entire app was built on CF with HTML before i started integrating Flex 3 with it. i found that i needed to create cookie variables for all my session variables i was using in order to maintain and remember who the user was in my CFC calls. i also found that after i compiled a flex app, i changed the .html to .cfm (the file that loads the compiled SWF file). by doing this i was able to pass CF session variables into the flex app and you can refer to these anywhere in Flex by using Application.application.parameters.{variable name here}

           

          add the CF variable in the FlashVars line to pass it into Flex (see the last line of code). this will create a variable (in my case i'm passing session.employeenumber). then in your flex app you can reference it by using Application.application.parameters.emplid:

           

          AC_FL_RunContent(
             "src", "Request",
             "width", "100%",
             "height", "87%",
             "align", "middle",
             "id", "Request",
             "quality", "high",
             "bgcolor", "#869ca7",
             "name", "Request",
             "allowScriptAccess","sameDomain",
             "type", "application/x-shockwave-flash",
             "pluginspage", "http://www.adobe.com/go/getflashplayer",
             "wmode","transparent",
             "FlashVars","emplid=<cfoutput>#session.employeenumber#</cfoutput"

           

          A little trick I learned (does Adobe really expect us to re-engineer how our apps have been working by no longer using sessions for Flex?). Then in your CFCs if you also create cookies for every session variable you can maintain the variables based on user login. HOPE THIS HELPS!

           

          -Matt