Hey all,
Snatching URLs from RSS, I’ve been able to populate an array of links; ran into some issues loading the images. Trying to use that array outside of its class has been problematic, and I don’t know where to place my loadImage().
Here’s the offending code:
thingTemp.prototype.update = function() {
this.lifespan -= 2;
for (let k = 0; k < this.link.length; k++) {
this.link.push(photos[k].getChild('media:content').getString('url')); //populates an array with image urls
}
};
thingTemp.prototype.display = function() {
tint(255, this.lifespan); //changes opacity
img = loadImage(this.link[0], success, fail);
image(img, this.x, this.y);
};