A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: missing variables..

  1. #1
    Junior Member
    Join Date
    Jul 2002
    Posts
    9
    I have a simple template populated with dynamic text boxes, each referencing a unique variable name, and each having the same graphical properties

    I have an asp script which takes prior posted variables and dumps them into turbine variables.

    I have three other turbine variables which I am just inserting text into.

    Now - could anybody out there please explain why it is that only the variables containing the posted data are shown when I generate to flash?



    <%
    Response.Expires = -1

    set Turbine = Server.CreateObject("Turbine.asp")
    Turbine.DisplayErrors = true
    Turbine.GenerateHTMLFirst("")

    Turbine.Template="../flash/EventDetail.swt"

    Dim varID,varEID


    varID = clng(Request("tEVENTDATEID"))
    varEID = clng(Request("tEVENTID"))


    Turbine.Variable("{tEVENTTIME}") = "12:00"
    Turbine.Variable("{tEVENTNOTES}") = "TEST TEST TEST TEST"
    Turbine.Variable("{tVENUEID}") = "X"

    Turbine.Variable("{tEVENTID}") = varEID
    Turbine.Variable("{tEVENTDATEID}") = varID
    Turbine.Variable("{tEVENTNAME}") = Request("tEVENTNAME")
    Turbine.Variable("{tEVENTDATE}") = Request("tEVENTDATE")
    Turbine.Variable("{tEVENTVENUE}") = Request("tEVENTVENUE")
    Turbine.Variable("{tEVENTARTIST}") = Request("tEVENTARTIST")
    Turbine.Variable("{tEVENTCITY}") = Request("tEVENTCITY")

    Turbine.GenerateFlash
    %>

    I have checked my spelling with the variables, and am very Frustrated...

    Thanks

    tony

  2. #2
    Senior Member
    Join Date
    Nov 2000
    Posts
    827
    Try comment out the Turbine.GenerateFlash and insert a few Response.Writes of the Request() variables passed on the POST queries - what do you get?

  3. #3
    Junior Member
    Join Date
    Jul 2002
    Posts
    9
    Hi Jorge.

    Sorry, I should have mentioned that I did so - and everything came through ok.

    Tony

  4. #4
    Senior Member
    Join Date
    Nov 2000
    Posts
    827
    Then it should be some problem with the .swt template - maybe it would help if you try with a simple template, that only displays those variables in text fields.

  5. #5
    Junior Member
    Join Date
    Jul 2002
    Posts
    9
    Jorge,

    I have tried everything - and it gets worse.

    It turns out that the variables being picked up by the generated swt are the posted variables from the calling .swf and not those set on the asp page.

    Thus, for some WIERD reason none of the turbine variables are being passed.

    The server is fine, as the calling page is successfully being generated from an SQL dataset (2000/SQL Server).

    Aaaahhhhhggghhhhhh

    So I have a simple asp page as per the manual setting three variables, and I have a three dynamic text box swt, with variables correctly spelled. I have outlined the text boxes so I can verify it is the correct one on generation.

    What have I missed?

    Tony


  6. #6
    Senior Member
    Join Date
    Nov 2000
    Posts
    827
    - From what you describe it could be related with the way GenerateHTMLFirst command works. Basically when Turbine finds this command it will immediately answer the HTTP request with the HTML template filled with a request for the actual Turbine generated Flash movie. For this to happen, the POST/GET parameters of the first request are added to the <object>/<embed> tags, so that the HTML page calls itself on a meaningful way - you can see what is being used on the HTML source after the first response. After the GenerateHTMLFirst command, the script halts processing immediatly.
    The second request (marked with "&_flash" at the end of the query string) ignores GenerateHTMLFirst and continues processing to actually generate the Flash movie.
    I'd suggest you to check if what is being passed on the <object>/<embed> parameters is what you expect, as this might be the cause of the problem. Maybe an immediate solution would be to remove the GenerateHTMLFirst command.

  7. #7
    Junior Member
    Join Date
    Jul 2002
    Posts
    9
    Jorge,

    I am now using loadMovie and have changed all the names of my Turbine variables and I still get an empty .swf

    This points to it possibly not being due to the posted variables.

    There must be something I am missing here - after all, Turbine has been in use for a while now...

    eeep

    Tony


  8. #8
    Junior Member
    Join Date
    Jul 2002
    Posts
    9

    Ooops

    Not to worry - it was my fault. (Doh!)

    I was assigning variables to text boxes using the Text Options Panel.... which is correct for MovieClipList, objects...however...

    Will my incorrect method be valid in any future release - I kind of like it.

    Thanks anyway

    Tony
    (Doh!)

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center