boolean usePauseButton = false;
boolean autorepeat = false;
if (controlsSource != null) {
useStopButton = controlsSource.booleanAttribute("stop");
usePauseButton = controlsSource.booleanAttribute("pause");
autorepeat = controlsSource.booleanAttribute("autorepeat");
}
int controls = ControlButtons.CONTROL_PLAY | (useStopButton ? ControlButtons.CONTROL_STOP : 0) | (usePauseButton ? ControlButtons.CONTROL_PAUSE : 0) | (autorepeat ? ControlButtons.CONTROL_REPLAY : 0);
int stimuliPerPage = main.intAttribute("stimuliPerPage");
myFolderParser = new FolderParser(stimuliDimension, stimuliPerPage, sequences, controls);
if (!myFolderParser.setSource(myStimuliFolder))