Hey
I am trying to make a sketch where I use loadXML outside of preload, because I want to be able to dynamically load the xml from different urls, determined by the user.
How would I best do that? Every time I call loadXML outside of preload in I get errors.
Answers
https://p5js.org/reference/#/p5/loadXML
Hey GoToLoop, thanks! But in the reference example they load the call loadXML inside preload... What if I wanted to load the xml on keyPressed for instance?
It also mentions the callback parameters:
https://Forum.Processing.org/two/discussions/tagged/callback
Ah, thanks a lot. Didn't really understand how that worked, but found this example where they show how to load (strings not xml) outside of preload: https://p5js.org/reference/#p5/loadStrings