How to select costume/sound into project

Is there a way I can use the import sounds/costumes dialog in a project? This is so the user can import a costume/sound from snap without going into the editor.


so... it loads the costume/sound in the currently opened sprite... How can I make it so that it reports the imported costume/sound.

Umm... item (last) of (my costumes)?

my problem is, when it imports the costume, it imports it to the current sprite, which, if you're on the community site, you can't change. Also, when you do it in presentation mode, the corresponding tab (costumes/sounds) shows up, which I don't want to happen.

Oh. That's not so good, I guess. But you're probably at least as competent to read the code and make a modified version without those behaviors as I am!

I managed to edit the code to instead of importing the thing, it sets a javascript variable to the selected thing. All I need to figure out now, is to make it close the dialog when you click import. Is there some function like


edit: wow, I guessed right. dialog.destroy() worked.

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