API.addSettings('preloadImages', ['bf001.jpg','bf009.jpg','bf010.jpg','bf014.jpg','bf028.jpg','bf033.jpg', 'bf037.jpg','bf048.jpg','bf201.jpg','bf205.jpg','bf206.jpg','bf210.jpg','bf221.jpg','bf244.jpg','bf253.jpg','bm002.jpg','bm005.jpg','bm021.jpg','bm026.jpg','bm029.jpg','bm041.jpg','bm200.jpg','bm201.jpg','bm210.jpg','bm227.jpg','bm229.jpg','bm232.jpg','bm240.jpg','bm242.jpg','bm246.jpg','bm251.jpg','wf009.jpg','wf011.jpg','wf014.jpg','wf017.jpg','wf020.jpg','wf021.jpg','wf025.jpg','wf038.jpg','wf205.jpg','wf208.jpg','wf209.jpg','wf213.jpg','wf214.jpg','wf218.jpg','wf224.jpg','wf231.jpg','wf243.jpg','wf245.jpg','wf247.jpg','wm011.jpg','wm016.jpg','wm022.jpg','wm032.jpg','wm033.jpg','wm200.jpg','wm205.jpg','wm208.jpg','wm210.jpg','wm213.jpg','wm214.jpg','wm218.jpg','wm219.jpg','wm229.jpg','wm244.jpg','wm247.jpg','wm251.jpg','wm254.jpg' ]);
Hi Colin,
Yes, it’s best to put this in the mgr file, so it will run before the study starts.
You’ll need to give the function the url to your images directory. For example:
API.addGlobal({
mediaURL: '/implicit/user/mayanna/groupeffect1/images/'
});
*Replace btarget + ‘#.jpg’ with e.g., ‘bf001.jpg’
var imagesArray = [
];
imagesArray.push(global.mediaURL + btarget + '1.jpg');
imagesArray.push(global.mediaURL + btarget + '2.jpg');
imagesArray.push(global.mediaURL + btarget + '3.jpg');
imagesArray.push(global.mediaURL + btarget + '4.jpg');
imagesArray.push(global.mediaURL + btarget + '5.jpg');
imagesArray.push(global.mediaURL + wtarget + '1.jpg');
imagesArray.push(global.mediaURL + wtarget + '2.jpg');
imagesArray.push(global.mediaURL + wtarget + '3.jpg');
imagesArray.push(global.mediaURL + wtarget + '4.jpg');
imagesArray.push(global.mediaURL + wtarget + '5.jpg');
imagesArray.push(global.mediaURL + 'iat.jpg');
API.addSettings('preloadImages', imagesArray);
--
You received this message because you are subscribed to the Google Groups "Minno.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minnojs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/minnojs/6e3ba247-f9eb-4e80-9aee-ec6c7dff1744n%40googlegroups.com.
Hi Mayan,
I’m happy to know there’s a solution – thank you for your help! Unfortunately, I made those edits and am getting an error. It says the global is not defined. That’s also the syntax error I get on each of the images (e.g., starting at line 18). The same thing happened when I deleted the first global (I don’t know what that’s there for – it’s just always in this file). Any ideas? Best, Colin.
From: Mayan Navon <navm...@gmail.com>
Sent: Wednesday, June 29, 2022 1:40 AM
To: Smith,Colin T <colin...@ufl.edu>
Cc: Minno.js <min...@googlegroups.com>
Subject: Re: [Minno.js] Preloading images
[External Email] |