2 Replies Latest reply on Oct 17, 2006 2:37 PM by JennHysuick

    How to Move to the Next Step

      Ok - so I've spent months on this really cool Flex app, everything works to this point, and I know what I want to do next, but can't find anywhere on the net that will describe how to do it.

      I have a ColdFusion website, and one of the pages will serve up the lovely .swf all that i've made. The problem is: how to I pass variables from the ColdFusion site (because it knows who you are logged in as) to the Flex application (because it needs to write to a database based on who you are, but it doens't know who you are).

      At this point, I have two folders on my server - on for the coldfusion site, and one that I've developed my Flex app in, and I've been inserting the .swf file into my CF page, so it plays the movie, but I can't figure out how to pass a variable around.

      And, do all my .mxml and .as files need to be in the same directory as my CF pages for everyone to play nice?? I thought I had done so well to create the app, but now I don't know how to get it out to the people who need it!

      Thanks in advance (I'm also going to post in the ColdFusion forum to see if anyone there can help out)!

        • 1. Re: How to Move to the Next Step
          peterent Level 2
          If you've built a SWF, you don't need to deploy the MXML and AS files since you aren't using FDS and the web-tier compiler.

          You have a page with the SWF file on it, right? An object/embed tag with move="abc.swf" then add you variables to the swf line as if it were an HTTP request:


          In your Flex Application (main) file, the Application object has a property named parameters. So you can do this:

          <mx:Application ... initialize="setvars()" >

          var userID:String;
          var userName:String;

          function setvars() : void

          Check out Application.parameters for more details.
          • 2. Re: How to Move to the Next Step
            JennHysuick Level 1
            Thanks for the help. it took me a while to get back to my program (been training all last week), but now that I've had a chance to look at it again, I got it working with your help!