How do i make a script to load a custom block xml?

title explains it all

I made a script here that replaces all contents of a project with a given XML. You can change the code and it might work. Snap! 6.9.2 Build Your Own Blocks

i mean get and load the block xml from the web data (database block)

Oh. I don't know that. Sorry.

you can use this project Snap! 6.9.2 Build Your Own Blocks

"Could not fetch project import xml
This project does not exist"
Am I seeing things?

no, I forgot to share it. It should be shared now

"Inside: TypeError
err.indexOf is not a function"

sorry, the xml formatter I used adds <?xml version="1.0" encoding="UTF-8"?> to the beginning, which, for some reason, snap throws an error if it's there. Just remove that (and I did update the project with that removed).

Now it works! "Imported Blocks Module: blocks."

nice, now how do i make a custom block that does this:


please fullscreen the image
continued in How do i make custom blocks to xml?

You can use @dardoro's library here: Snap! 6.9.2 Build Your Own Blocks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.