Welcome, Guest
  • Author Topic: Iterative session transcript query  (Read 600 times)

    Phil Swallow

    • Server what's that
    • *
    • Posts: 3
      • View Profile
      • Email
    Iterative session transcript query
    « on: 09/22/03, 15:35 »
    Hello - I am somewhat new to Flash MX and have an early prototype page at http://www.reframe.net/clqonweb.htm which does part of what I want and I don't know how to do the next bit.  I have looked far and wide upon the net and now I hope someone here can help.

    I am a psychotherapist/coach and the page I have put together contains a series of questions from a therapeutic/coaching process called Clean Language.  One of the things we know from our working experience is that even when you know what a question will be, hearing someone else ask you that question makes a difference, somehow.  

    So the page is designed to allow someone to have questions asked of them by a (mostly) human voice (mine).  It achieves this already, after a fashion - it needs design work and other improvements (this is a first prototype - I promise my voice will be less stilted next version).

    My second intention is for the user to be able to:

    click on the question they want to be asked,
    hear it asked,
    type in a reply, then
    choose another question

    and so on until they have either worked out whatever they want to work out or got sick of my voice.

    The third outcome I have in mind is that at the end of the session, I want the user to be able to print out a transcript of the whole session that reads sequentially 'question 1, response 1, question 2, response 2,' etc, as if it had been an actual face-to-face rather than a face-to-screen session.

    I can happily work out the looping in the timeline and so on. What I don't know is how to build up this transcript because if I use variables in a loop, I imagine the variable will be overwritten each time.  I saw a reference to a local shared object which might be useful since it resides clientside so privacy is pretty assured.  It would be okay if the text needs to go to a text file, a database or array on the server though.

    Essentially the transcript is a list that alternates between the last question asked by my recorded voice (I use the text of the question as the button for that spoken question so I should just be able to use that) and the last response typed in by the user to a box.

    My apologies if this is not very technical - I hope someone can at least give me a clue where to be looking.  I suspect we are looking at some of the technology of forms, variables, a scripting language like PHP?

    I will apreciate any help you can offer.

    Thanks

    Phil Swallow


    Musicman

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 2685
      • View Profile
      • Email
    Re:Iterative session transcript query
    « Reply #1 on: 09/23/03, 01:16 »
    Hi Phil,

    you are perfectly right with the local sharedobject - it can accumulate responses and keep them, in case the visitor wants to stop and continue later (or in case the computer stops on them :( by itself)
    The technical construct you want to use is an array - whenever a new question / response  is there, push them onto a list (like put another sheet of paper on top of a pile)
    If the array is part of a SO, you would flush (save) that after every resonse.
    You probably dont need any server script here - but maybe sending the text to a server and getting back a printable browser window might be better than printing from flash

    Musicman

    Phil Swallow

    • Server what's that
    • *
    • Posts: 3
      • View Profile
      • Email
    Re:Iterative session transcript query
    « Reply #2 on: 09/23/03, 04:35 »
    Thanks - I appreciate the quick response - it's good to know that what I want to do is possible.  I am new to scripting and don't know how to send things to an array - is this related to the GET or POST choice I have seen people discussing?  How does it add each question response so that it does not erase the previous?

    Is there a tutorial I could work through, rather than use up bandwidth with dumb questions here?

    Thanks again

    Phil

    Musicman

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 2685
      • View Profile
      • Email
    Re:Iterative session transcript query
    « Reply #3 on: 09/23/03, 09:18 »
    Hi,

    say the current question is variable qno and the response is variable (textfield) reply, you would use code like
    sess = []; // create empty array

    sess.push({q:qno, r:reply}); // store response

    If you are using a sharedobject, you would have

    so = sharedobject.getlocal("sess");
    if(typeof(so.data.sess) == 'undefined')
      so.data.sess = [];

    so.data.sess.push({q:qno, r:reply}); // store response
    so.flush; // save to file as well

    The GET and POST bits are for talking to a server - if you want to send transcript of a session, you will have to use POST

    Musicman

    Phil Swallow

    • Server what's that
    • *
    • Posts: 3
      • View Profile
      • Email
    Re:Iterative session transcript query
    « Reply #4 on: 09/23/03, 09:25 »
    You star - thanks for this - I'll let you know how I get on.

    Cheers again

    Phil