Behavioral Research with Flash Workshop at USC – January 2009

(Updated 2/19/2009)

IMPORTANT UPDATE

There was a small error in the parseflash.php file that causes an annoying data handling problem. It is nothing major (all your data will still store properly), but here is the correct version. Please simply replace the on you have.

Download: http://www.jeffgalak.com/flashworkshop/usc/workshopfiles/parseflash.php.
In order to download the file, right-click on the link and select “Save As”
Please note that I have updated all of the zip files below to reflect the change


Welcome to the information page for the Programming Experiment in Flash Workshop. Here you will find all the required resources.  

Workshop Schedule:

  • Session 1: Thursday, January 29th (2-4pm): Intro to Web Programming, PhP, and Flash
  • Session 2: Friday, January 30th (10-12pm): Building Your First Flash Experiment
  • Session 3: Friday, January 30th (3-5pm): Advanced Topics if Flash(Sounds, Videos, and Real Time Ratings)
  • Location: USC - Hoffman Hall, Room 303

Required/Recommended Programs

  1. Adobe Flash CS4 – http://www.adobe.com/products/flash/
    • This is the primary program used to create experiments. You can download a free trial at the link above or you can see if your IT dept has a license for it.
    • Although version CS4 is not required, it is the one I will be using during the workshop. If you have an older version, you will be fine.
    • Although I am using CS4, all Actionscript is version 2.0 (not 3.0). If you don’t know what this means, don’t worry about it.
  2. EditPad Pro – http://www.editpadpro.com/
    • This is a very versatile and free text editing software we will use for editing PhP documents.
    • By no means is this particular program required, but I text editor slightly more advanced than Notepad will make your life easier.
  3. Filezilla (Client) – http://filezilla-project.org/
    • This is a free FTP program that we will use to upload all of our files to a web server.
    • Like EditPad Pro, you do not need this particular program, but it is quite good and the one I will use.

Introductory Resources

  1. Flash Introduction (University of Kansas ) – http://www.techdocs.ku.edu/docs/flash_mx2004_introduction.pdf
    • This is a very nice introduction to the basics of Flash done by the Academic Computing Services of the University of Kansas.
    • This document uses Flash MX 2004, but the basics are all the same as CS4.
    • Feel free to ignore everything related to animation (e.g. Tweening) as it is not relevant for this workshop.
  2. Total Training Videos – http://www.totaltraining.com/prod/adobe/flashpro8.asp
    • Total Training is a teaching product that has instructional videos for a lot of computer related products.
    • I don’t suggest that you go out and buy the Flash videos, but they do provide quite a few of the introductory ones for free. Just go to the above link and click on “Free Tutorials.”
    • Follow the instructions and you’ll be taken to the videos. I suggest going through as much as you can in the courses “Flash Professional 8″ and “Flash Professional 8 – Actionscript,” You can check out the Flash CS3 tutorials too, but I suspect they will be redundant.

Important Files

  1. Workshop Files for Session 1 – http://www.jeffgalak.com/flashworkshop/usc/workshopfiles/workshopfiles.zip
    • The above is a zip file containing 9 files that you’ll need. They are:
      1. workshopfiles.fla: This is the file you open in Flash to edit. It is formatted to work ONLY with Flash CS3 (or newer) and is what I will be using.
      2. workshopfiles_FLASH8.fla: This is the same file as above but compatible with Flash 8 and newer. I’m guessing that many of you will use this version. It has the exact same structure and code, so don’t worry about the compatibility issues.
      3. workshopfiles.swf: This is the compiled version of the program that you would upload to your web server.
      4. workshopfiles.txt: This is a text file that you can ignore. It simply keeps track of the conditions (more on this in the workshop).
      5. workshopfiles.php: This is the php script that opens the program on the server and assigns conditions.
      6. parseflash.php: This is the code that handles all the data processing.
      7. workshopfilesdebrief.php: This is the file where you include your debriefing. Edit it with EditPad Pro.
      8. jeff.jpg: An image used in the program
      9. leff.jpg: Another image.
    • You can see what the final version looks like here: http://www.jeffgalak.com/flashworkshop/usc/workshopfiles/workshopfiles.php
  2. Workshop Files for Session 3 – hhttp://www.jeffgalak.com/flashworkshop/usc/workshopfiles2/workshopfiles2.zip
    • The above is a zip file containing 9 files that you’ll need for Session 3. They are:
      1. workshopfiles2.fla: This is the file you open in Flash to edit. It is formatted to work ONLY with Flash CS3 (or newer) and is what I will be using.
      2. workshopfiles2_FLASH8.fla: This is the same file as above but compatible with Flash 8 and newer. I’m guessing that many of you will use this version. It has the exact same structure and code, so don’t worry about the compatibility issues.
      3. workshopfiles2.swf: This is the compiled version of the program that you would upload to your web server.
      4. workshopfiles2.txt: This is a text file that you can ignore. It simply keeps track of the conditions (more on this in the workshop).
      5. workshopfiles2.php: This is the php script that opens the program on the server and assigns conditions.
      6. parseflash.php: This is the code that handles all the data processing.
      7. workshopfiles2debrief.php: This is the file where you include your debriefing. Edit it with EditPad Pro.
      8. forthebirds.flv: Video file for the program.
      9. lifted.flv: Another video file for the program.
  3. Powerpoint for Session 1 -http://www.jeffgalak.com/flashworkshop/usc/ppt/Flash Workshop – Session 1 v1.ppt
  4. Powerpoint for Session 2 -http://www.jeffgalak.com/flashworkshop/usc/ppt/Flash Workshop – Session 2 v1.ppt
  5. Powerpoint for Session 3 -http://www.jeffgalak.com/flashworkshop/usc/ppt/Flash Workshop – Session 3 v1.ppt
  6. Experiment Check List -http://www.jeffgalak.com/flashworkshop/usc/Experiment Check List.doc

 

 

 


   

Post Workshop Information/Resources

  1. Files for Session 2: http://jeffgalak.com/flashworkshop/usc/mp3/mp3.zip
    • The above zip file contains all the files we used/created during the second session of the workshop (MP3 Study). I have updated it to use the correct image files and cleaned up some of the layout. The files are:
      1. mp3.fla: This is the file you open in Flash to edit. It is formatted to work ONLY with Flash CS3 (or newer) and is what I will be using.
      2. mp3_FLASH8.fla: Same as above but for Flash 8 or newer.
      3. mp3.swf: This is the compiled version of the program that you would upload to your web server.
      4. mp3.txt: This is a text file that you can ignore. It simply keeps track of the conditions (more on this in the workshop).
      5. mp3.php: This is the php script that opens the program on the server and assigns conditions.
      6. parseflash.php: This is the code that handles all the data processing.
      7. workshopfilesdebrief.php: This is the file where you include your debriefing. Edit it with EditPad Pro.
      8. mp3player1.jpg: An image used in the program
      9. mp3player2.jpg: Another image.
      10. MP3 Study Template.doc: The template for the study.
    • You can test the program at: http://jeffgalak.com/flashworkshop/usc/mp3/mp3.php
  2. As promised, here are the most frequently used HTML tags to use when formatting text in a dynamic text box. Remember, you MUST a) check the “render as HTML” box for the dynamic text box and b) send the data via a variable (as opposed to via the ‘text’ property). So here’s an example of correct formatting: outputtext = “<b>This is a test</b>”;
    • Bold: <b></b> (use: <b>This is a test</b>   Results in: This is a test)
    • Underline: <u></u> (use: <u>This is a test</u>   Results in: This is a test)
    • Italics: <i></i> (use: <i>This is a test</i>   Results in: This is a test)
    • Colors: <font color=’#FF0000′></font> (use: <font color=’#FF0000′>This is a test</font>   Results in: This is a test)
  3. “True” Randomization
    • Instead of sequentially assigning conditions, you may want to assign them randomly. To do this you use the Math.random() function. This generates a number between 0 and 1. Then you use conditional statements to assigns experimental conditions.
    • For example, let’s say you have 4 conditions: A,B,C, and D. You would write the following code:
    • tempnum = Math.random();
      if(tempnum < .25){condition = “A”;}
      else if(tempnum < .5){condition = “B”;}
      else if(tempnum < .75){condition = “C”;} 
      else {condition = “D”;}

If you have any questions, please feel free to contact me at jgalak@stern.nyu.edu