Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 7 of 7

Thread: Recording trial-based responses from Flash (case 434)

  1. #1
    Join Date
    Feb 2012

    Recording trial-based responses from Flash (case 434)


    I'm fairly new to both MediaLab and DirectRT. I'm using the 2008 version of both softwares.

    After browsing through the help files, I have some questions regarding the use of Flash files (SWF) in my experiment.
    First of all, I would like to know if it's possible to embed Flash files in DirectRT, because my experiment is trial-based and I prefer to use DirectRT.
    As far as I know, I can only do this in MediaLab... right?

    Assuming I have to use MediaLab for this, I would very much like to know:
    1. What types of communication are possible between a Flash movie and MediaLab? My subjects will perform a Flash-based visual task and I want to record their responses, as well as their response time.
    2. Each subject will perform many trials, repeating the same Flash-based visual task. Can MediaLab handle trial-based results?

    Thank you, Ziv
    Last edited by jason_reed; 01-15-2015 at 11:54 AM.

  2. #2
    Join Date
    Nov 2005
    You are correct that DirectRT doesn't do Flash yet. MediaLab can handle it but capturing the data from Flash is trickier. Are you able to post data from Flash to a URL--e.g., sending a web browser a command to go to some URL with some optional arguments? If so, MediaLab could probably intercept the data from those data postings / commands to the browser. Does that make any sense?

  3. #3
    Join Date
    Feb 2012
    Yes it makes sense. If I'm able to post the URL data from Flash, how do I record this in MediaLab? Thanks.

  4. #4
    Join Date
    Nov 2005
    First take a look at the section on Custom Items in the user's guide. If you can embed a flash file within a custom item (e.g., an HTML page) and have it execute a post command, then MediaLab can probably intercept whatever data you like. Take a look at the samples too--then if you have any questions be sure to let me know! I'd be curious to see if you could pull this off--would be very cool.

  5. #5
    Join Date
    Feb 2012
    Hi Blair,

    I appreciate your advice so far.

    Ok, so I've managed to embed a Flash-based visual-task file inside a Custom Item (HTML file), and have it re-load the page with a POST request containing the appropriate variables (I have 2 of them in each Flash-based trial: "xPos" & "Side"). Doing this outside of MediaLab, in the latest versions of Chrome or Firefox for example, works perfectly, and I can see both variables showing up as $_POST variables in a PHP echo.

    However, when running a questionnaire in MediaLab 2008, I encounter 2 serious problems:
    1. MediaLab keeps crashing (100% of the times) right after the POST submit (even though it first notifies me to "Please inform the experimenter that you have completed this portion of the session").
    2. Looking at the results table in Excel, I see the variable *names* showing up instead of their *values*. So it doesn't seem to be intercepting the data.

    I suspect the first problem has to do with MediaLab's built-in IE browser. Is it possible to force the questionnaire to load my HTML in a different browser?

    I'm also attaching the questionnaire file I'm using. I'd be grateful if you could take a look at it and tell me what I'm doing wrong.

    - Thanks, Ziv
    Attached Files Attached Files

  6. #6
    Join Date
    Feb 2012
    Nevermind, I solved it!
    Instead of having the Flash script itself initiate a POST request, it's now passing the parameters to the client-side JS, and that code submits a hidden form.

  7. #7
    Join Date
    Jul 2012

    (case 35)

    zlevin, as a Flash guy myself, I'd appreciate any code or source files you're willing to share. I imagine I'll be doing this in the near future.

    my email is
    sdavis at mays dot tamu dot edu
    Last edited by jason_reed; 10-15-2013 at 05:43 PM.

Similar Threads

  1. Skip patterns based on previous responses (case383)
    By KMikolow in forum MediaLab Older Versions: How Do I...
    Replies: 4
    Last Post: 09-11-2014, 09:55 AM
  2. Skipping based on previous responses
    By shendric in forum DirectRT Older Versions: How Do I...
    Replies: 7
    Last Post: 07-28-2014, 07:41 PM
  3. How Do I Skip Based on Responses in a Certain Range?
    By hcdevlin in forum MediaLab Older Versions: How Do I...
    Replies: 0
    Last Post: 09-25-2011, 08:51 AM
  4. stimuli presentation based on previous responses
    By M.Cohen in forum DirectRT Older Versions: General Questions
    Replies: 0
    Last Post: 08-18-2011, 12:54 PM
  5. printing responses based on scoring of questionnaires
    By dkparker in forum Pre-Sales and Licensing FAQ
    Replies: 1
    Last Post: 03-26-2009, 03:44 PM

Posting Permissions

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