Hi! I was just curious about something. Are external links allowed? For example, I was going to put a link in my project to a youtube video, because the music for the game takes up too much space. Is that okay? If not, that's fine, I can just turn it into a gag of "snap music takes up too much space, so go play your own music or something"
I wasn't really referring to loading media, but having a link in the program (one in a list so the user can copy and paste it) for music.
Basically, just giving the user a link and telling them to go to it.
Gosh dang it you got me XD
But yeah, now that I think about it, putting it in the project description or something would be much better.
Unless there's an way to put an actual hyperlink in a project, and not just a link that the user has to copy? I haven't really seen anything in Snap! that can interact like that, functioning as an actual hyperlink.
you can still put it in the project though, which will let users do it more efficiently if they are in full screen or the editor. I'll show you how.
(be prepared, because its a lot of extensions and it hasnt been done before)
Like Javascript extensions? Don't those need to be activated by going into the editor and turning them on? At that point, it would be easier to just put it in the description.
It is possible to add a hyperlink into a project (with a block that opens a url in a new tab), however that requires javascript, which also means that the user has to be in the editor. Putting it in the description (and also in the project) is probably the best option.
Two things:
First, and the least important of the two, I'm not a huge fan of the fact that it makes an entire brand-new sprite to do it. Couldn't the link also be a clone, and instead of the hitbox using my parent, it uses my anchor?
But secondly, and more importantly, it doesn't seem to work unless extension blocks have been turned on at least once. Once they have been turned on, they can be turned off and still work, but that also requires going into the project, just like the Javascript extensions
Actually, with it not working unless extension blocks are turned on, that seems to be wrong. I can't tell what exactly causes it to not work, and what causes it to start working, but I think Javascript and extension blocks have to be turned on, then the block needs to be clicked on and not called by a hat block or something? No clue what's going on there.
Just showing this is arguably much much better than creating a script that creates a new sprite that creates this script using hyperblocks, using an extension to create fancy text (which can be done without javascript, just look at the Writing and Formatting library), and scisnap to add the script to the newly created sprite.
If you're going to be giving us a script to do something like opening an external webpage, please share the code that actually does that, rather than spending hours creating a large script to do a lot of extra visual flair that no one's actually going to use.
Also, your script literally lags a whole lot, slowing snap down, all because you chose to throw it all in a warp block. Sometimes warp doesn't make things faster. Seriously, it actually ran at a reasonable speed (without slowing snap down) just by removing the warp block.
I'm not sure what's going on with you, but it seems to load just fine for me without turning on javascript extensions.
I mean, I've already done that, the OP was asking for a hyperlink so that's what I did.
ik, completely my mistake. I looked back at the code and I was like "literally why is there a warp block, this won't help at all,"
what? now you're just being annoying.
honestly I didn't want to use a clone of the original sprite because it could interfere with when I start as a clone scripts and i don't know if you can change the scripts of clones. btw, the block is fixed now (no warp) so try it out.
I scanned through this topic, and I don't see anywhere where you sent just the script to just open a url in a snap project.
I feel like they were more looking for a way to open a url in a new tab with code. Creating the actual text and clicking event code is simple enough for anyone to do, opening a url in a new tab is not as easy to do. It's a little similar to The XY Problem.