Projekt kann nicht geladen werden

Hi, i hope, this is the right place for my question. Im encountering an error while trying to load a specific project. I get the error message "Load failed: Type Error: Cannot read properties of undefined (reading: 'loaded')". This happens when trying to access the project from the snap cloud as well when i try to import the project from my local pc.
If this is helpul: In the project, there is a script to load a costume from the web by using a JavaScript function.

Any helpful thoughts?

Greetings

Could you share the JS code?

(Also: We usually use Snap! Editor for problems in your code.)

Can you send a link to the project?

Thanks for the quick reply and sorry for the wrong category. I'm a newbie in this forum.

Here is the link to my exported project: Z_Pokedex.xml - Google Drive

I took the JavaScript-Code from this post: Load image as costume from URL - #2 by jens

I currently can't find what is wrong with your project file, but I can tell you that there is a better way to load a costume from a url (without js).

Enable "Extension blocks", which will then add 2 "primitive" blocks to the variables category (they're grey).
Drag out the reporter version, then in the dropdown, select "cst_load(url)". Then put the url of the costume you want to load in the first editable input.

Now, the best practice when using these blocks is to create a custom block that uses the "primitive" block instead.

Normally I would tell you to avoid these at all costs, and use the library block that uses it, but there is no library block to load a costume from url.

Thanks for your help. Now it's working:
https://snap.berkeley.edu/snap/snap.html#present:Username=mrpaush&ProjectName=Z_Pokedex_v2

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