CF pass variables to Flash

Ask a Question related to Coldfusion Flash Integration, Design and Development.

  1. #1

    Default CF pass variables to Flash

    Hello:

    Basically I want Coldfusion to pass the server date to Flash. But I get
    '#theDt#' instead of the value of 'theDt' please see the code below:

    Thank you in advance.

    ************************************************
    theDate.cfm

    <cfsetting enableCFoutputOnly="Yes">
    <cfset theDt = dateFormat(now(), 'mm-dd-yyyy')>
    <cfoutput>
    &serverDate=#theDt#
    </cfoutput>
    ************************************************** ***************

    var my_lv:LoadVars = new LoadVars();
    my_lv.onLoad = function(success:Boolean) {
    if(success) {
    theDate.text = my_lv.serverDate;
    //theDate.text = this['serverDate'];
    //theDate.text = this.serverDate;
    } else {
    var localDate:Date = new Date();
    theDate.text =
    (localDate.getMonth()+1)+"/"+localDate.getDate()+"/"+localDate.getFullYear();
    }
    }
    my_lv.load("C:\\CFusionMX7\\wwwroot\\OC\\theDate.c fm");
    ************************************************** *************

    lvbao Guest

  2. Similar Questions and Discussions

    1. How to pass variables from JavaScript to Flex
      Dear Flex comunity, Is there anyone who knows why isn't this code working? --FLEX 3-- <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"...
    2. Interesting Pass Variables to Flash
      What I am attempting to do in a whole is to create swf files that will be drawn from several premaid swf's, alls I want to do is change the data...
    3. pass variables when execute a Dir movie
      Hello, I'd like to know if it's possible to initialize a Director movie from othe application (for example C++Builder) passing it already some...
    4. Can one pass variables through a selector?
      In article <clund-50F2A4.12443709092003@amstwist00.chello.com>, C Lund wrote: Yes - either use an NSInvocation to perform the call, or call...
    5. IS it better to use session variables or pass a URL variable
      Yes, I am sure the answer starts with - It depends... Well, I am trying to get a person's name from one page to the next. The name will obviously...
  3. #2

    Default Re: CF pass variables to Flash

    I think it doesn't work because the flash variable serverDate is not known to Coldfusion and the Coldfusion variable serverDate is not known to Flash.


    BKBK Guest

  4. #3

    Default Re: CF pass variables to Flash

    my_lv.load("C:\\CFusionMX7\\wwwroot\\OC\\theDate.c fm");

    You are not "executing" a CF page, just reading the content.

    The route should be something like (if you are testing in your machine) :
    my_lv.load("http://127.0.0.1//OC//theDate.cfm"); or the URL corresponding (and
    the webserver must be configured to execute CF pages)

    Regards

    Sojovi Guest

  5. #4

    Default Re: CF pass variables to Flash

    Solved it? If not, think of [url]http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000654.htm[/url]
    BKBK Guest

  6. #5

    Default Re: CF pass variables to Flash

    Yep, it works. Thank you Sojovi, BKBK for your answer.
    lvbao Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139