Student imported his app for Unit 3 from App Lab to Unit 3 Lesson 10 to submit. He imported the screens and all of the sounds/assets as well.
He then copied and pasted the code from App Lab to Lesson 10.
The “resident” sounds from Code.org all work, but none of his custom sounds play.
The sound files are all intact. I’m stuck.
Any thoughts?
Are they locally referenced? That would mean just entering the filename, like this:
playSound("example.mp3");
You might want to try externally referencing them, which would require you to prepend the storage URL for each one in the code. The storage URL looks like this:
https://studio.code.org/v3/assets/channel_id/
Replace “channel_id” with, well, the channel ID of the original project. That would be the long string of gibberish found after
https://studio.code.org/projects/applab/
Make sure not to copy the /edit or anything at the end like that.
After you have your channel ID, which in this case, I’ll use “jfuekfj”, the storage URL should look like:
https://studio.code.org/v3/assets/jfuekfj/
Then, you’ll need to go through every playSound
block and put the storage URL in front of the URL. This can be a hassle done manually, so go into text mode, press Ctrl+F twice, and enter this in the first box:
playSound("
Enter this in the second box:
playSound("https://studio.code.org/v3/assets/jfuekfj/
Make sure you don’t use “jfuekfj”, but the original app’s channel ID.
Then, click “All”. If that doesn’t work, just click “Replace” until the first box turns red.
I know it’s a hassle, but that’s the only way I know for sure works.