Reply To: Page loading problems

PennController for IBEX Forums Support Page loading problems Reply To: Page loading problems

#5303
Jeremy
Keymaster

Hi,

The function PreloadZip tells your experiment to download a ZIP file and uncompress its files into the browser’s cache so your trials can look up for resources there, but technically it doesn’t really control loading time. What you can do to control preloading time though is use CheckPreloaded to create a trial that will wait until resources are preloaded, or a delay is over, before proceeding:

PennController.ResetPrefix(null)

PreloadZip("https://.../.../myArchive.zip")

Sequence("intro", "preload", /* ... */ )

newTrial( "intro",
  newButton("Welcome. Click here to proceed.").print().wait() 
)

CheckPreloaded( 5 * 60 * 1000 ) // wait for up to 5 minutes
    .label("preload")

// rest of your experiment

Jeremy