Display image for 25ms

Discussion in 'Mac Apps and Mac App Store' started by Goettel, Mar 19, 2009.

  1. Goettel macrumors member

    Oct 1, 2008
    Hi all,

    I have an experiment to build for a psychology course at college. We need to present images for very short periods of time to our subjects. The times are in the order of 25 to 2000 ms (0.025 to 2 seconds). At first I thought of using Powerpoint but the problem is that it rounds off at 0.01s and seems to randomly change the time value we enter. :apple: Keynote is not an option as the minimal time of exposition is 0.1s.

    I found a little program called Psyscope but it involves a lot of scripting that I am not very apt to do.

    Any ideas are appreciated.

  2. pit29 macrumors 6502a


    May 23, 2006
    The Golden State
    1. I'm not on my computer right now so I can't test, but can't you (in keynote) just have a white block over the word dissappear, and 25ms later another white block appear? That'd get you around the 'exposition' limitations...

    2. Flash? (Adobe Flash, that is...)
  3. angelwatt Moderator emeritus


    Aug 16, 2005
    The first that came to mind was using JavaScript to set it up. It sounds like you would be running this study locally so download speeds won't be an issue. I put a very very simple thing together to show the basic premise.

    Just copy and paste the following code into a text editor, preferably something other than TextEdit as you have to make sure it saves as plain text rather than rich text. Also, you'll have to have a image in the same folder for this to reference. In the code, it assumes there's an image with the name "image01.jpg" so you can either rename a image you have or change that piece of the code.

    If you think this may be of value I can try to help you out more. It does involve a little coding, but not much and not too hard.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <style type="text/css">
    img {
     display: none;
    <script type="text/javascript">
    function FlashImage()
      var img = document.getElementsByTagName('img')[0];
      img.style.display = 'inline';
      setTimeout(function(){ UnFlashImage(img); }, 25);
    function UnFlashImage(img)
      img.style.display = 'none';
    <p><button onclick="FlashImage();">Flash Picture</button></p>
    <img src="image01.jpg" alt="" width="640" height="480" />

Share This Page