Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Snap! user discussion
- bharvey
- Teacher
1000+ posts
Snap! user discussion
You should stop using “local” (we'll probably remove it eventually) and instead use “export project” to get your project in an XML file in your downloads folder. I am now often using local Snap! with Windows.
In which directory are stored my “local” Snap! projects ?
- bharvey
- Teacher
1000+ posts
Snap! user discussion
That should work. I think I vaguely recall that after an OS upgrade I had to local the image file The BYOB application and the BYOB.image are both in the Applications folder, inside the “BYOB 3.1 Mac” folder.once, but after that it worked without complaint. Anyone else running BYOB on a Mac?
- cycomachead
- Scratcher
100+ posts
Snap! user discussion
That should work. I think I vaguely recall that after an OS upgrade I had to local the image file The BYOB application and the BYOB.image are both in the Applications folder, inside the “BYOB 3.1 Mac” folder.once, but after that it worked without complaint. Anyone else running BYOB on a Mac?
I just tried myself with a new installation of BYOB and ran into the same issues. It has something do with the sandboxing requirements.
If you click on byob.image things work without issue, but it's not quite as obvious.
- s_federici
- Scratcher
500+ posts
Snap! user discussion
If you click on byob.image things work without issue
Do you mean selecting each time the byob.image? Yes, it does work, but I would like to avoid to my students to select byob.image every time they run BYOB. If this is possible, in the new version of MacOS. What it is weird is that the old installation still works as expected after updating MacOS.
- Jonathan50
- Scratcher
1000+ posts
Snap! user discussion
I don't have this problem On MacOS 10.12.6.
Not yet a Knight of the Mu Calculus.
- cycomachead
- Scratcher
100+ posts
Snap! user discussion
If you click on byob.image things work without issue
Do you mean selecting each time the byob.image? Yes, it does work, but I would like to avoid to my students to select byob.image every time they run BYOB. If this is possible, in the new version of MacOS. What it is weird is that the old installation still works as expected after updating MacOS.
I mean, instead of clicking byob.app, just double click byob.image to open it. (Or put it in the dock instead of byob.app, but it will need to go on the right side of the little divider line.)
I see the behavior you're describing. I feel like there's some issue with the sandboxing rules on macOS, but I don't really know how to fix it.
- s_federici
- Scratcher
500+ posts
Snap! user discussion
I mean, instead of clicking byob.app, just double click byob.image to open it.
Excellent! It does work! I don't know why I hadn't tried it. Thanks a lot for your help.
- bharvey
- Teacher
1000+ posts
Snap! user discussion
There's sandboxing for standalone programs? I feel like there's some issue with the sandboxing rules on macOS
- comp09
- Scratcher
1000+ posts
Snap! user discussion
Sandboxing is mandatory if you distribute via App Store. It's optional if it isn't, and it probably is disabled unless you explicitly enable it.There's sandboxing for standalone programs? I feel like there's some issue with the sandboxing rules on macOS
- simple_schoolteacher
- New Scratcher
11 posts
Snap! user discussion
Snap! written in Javascript, so the programs made on it can be embedded in web pages without the Snap IDE? How can I do this with my students?
- s_federici
- Scratcher
500+ posts
Snap! user discussion
I did it, several years ago, but I don't remember the details right now. So I'll leave it to Jens the description of the necessary steps. If I'm correct, I think you should just link to snap by passing parameters for the project location and to start in presentation mode. I don't remember the possibility of disabling the start/stop buttons. Snap! written in Javascript, so the programs made on it can be embedded in web pages without the Snap IDE?
Anyway, if you just need to embed Scratch 2 programs in a webpage and flash is not allowed, you can use Sulfurous (https://sulfurous.aau.at/~sulfurous/) or Phosphorus (https://phosphorus.github.io/) javascript players.
- simple_schoolteacher
- New Scratcher
11 posts
Snap! user discussion
How do I force stage in presentation mode to hold a specified size?I did it, several years ago, but I don't remember the details right now. So I'll leave it to Jens the description of the necessary steps. If I'm correct, I think you should just link to snap by passing parameters for the project location Snap! written in Javascript, so the programs made on it can be embedded in web pages without the Snap IDE?and to start in presentation mode. I don't remember the possibility of disabling the start/stop buttons.
Anyway, if you just need to embed Scratch 2 programs in a webpage and flash is not allowed, you can use Sulfurous (https://sulfurous.aau.at/~sulfurous/) or Phosphorus (https://phosphorus.github.io/) javascript players.
Last edited by simple_schoolteacher (March 30, 2018 16:49:01)
- simple_schoolteacher
- New Scratcher
11 posts
Snap! user discussion
How can I convert a Snap! app with homemade blocks in Scratch 2?I did it, several years ago, but I don't remember the details right now. So I'll leave it to Jens the description of the necessary steps. If I'm correct, I think you should just link to snap by passing parameters for the project location and to start in presentation mode. I don't remember the possibility of disabling the start/stop buttons. Snap! written in Javascript, so the programs made on it can be embedded in web pages without the Snap IDE?
Anyway, if you just need to embed Scratch 2 programs in a webpage and flash is not allowed, you can use Sulfurous (https://sulfurous.aau.at/~sulfurous/) or Phosphorus (https://phosphorus.github.io/) javascript players.
- simple_schoolteacher
- New Scratcher
11 posts
Snap! user discussion
This was written in this forum, only before?I did it, several years ago, but I don't remember the details right now. Snap! written in Javascript, so the programs made on it can be embedded in web pages without the Snap IDE?So I'll leave it to Jens the description of the necessary steps. If I'm correct, I think you should just link to snap by passing parameters for the project location and to start in presentation mode. I don't remember the possibility of disabling the start/stop buttons.
Anyway, if you just need to embed Scratch 2 programs in a webpage and flash is not allowed, you can use Sulfurous (https://sulfurous.aau.at/~sulfurous/) or Phosphorus (https://phosphorus.github.io/) javascript players.
- bharvey
- Teacher
1000+ posts
Snap! user discussion
Sandboxing is mandatory if you distribute via App Store.I see, it's kind of like Sugar on the XO. So if you're writing a disk cleanup app, you can ask for, and get, access to all files. That's not so bad. I was thinking it would be like Javascript sandboxing with hard boundaries.
- bharvey
- Teacher
1000+ posts
Snap! user discussion
Well, technically, the IDE is still there, but you can make it either invisible on startup or absolutely inaccessible. Snap! written in Javascript, so the programs made on it can be embedded in web pages without the Snap IDE? How can I do this with my students?
There are several ways to include a pointer to a project in the URL when starting Snap! in order to load a project automatically. You can think of such a URL as just running the project rather than as running Snap!, especially if the URL says to start in presentation mode and click the green flag. The general form is
http://snap.berkeley.edu/run#verb:project&flag&flag…
Here’s an example that loads a project stored at the Snap! web site (not the Snap! cloud!):
http://snap.berkeley.edu/run#open:http://snap.berkeley.edu/snapsource/Examples/vee.xml
If the verb is run, then you can also use any subset of the following four flags:
&editMode Start in edit mode, not presentation mode.
&noRun Don’t click the green flag.
&hideControls Don’t show the row of buttons above the stage
(edit mode, green flag, pause, stop).
&noExitWarning When closing the window or loading a different
URL, don’t show the browser “are you sure you
want to leave this page” message.
The last of these flags is intended for use on a web page in which a Snap! window is embedded.
Here’s an example that loads a shared (public) project from the Snap! cloud:
http://snap.berkeley.edu/run#present:Username=jens&ProjectName=tree%20animation
P.S. Having said all that, we really recommend letting students see the code of a project – that's how they learn.
Last edited by bharvey (March 31, 2018 14:55:40)
- simple_schoolteacher
- New Scratcher
11 posts
Snap! user discussion
Snap! you can change the size of Stage, but in presentation mode its size is still adjusted to the size of the screen. Is there a way to show stage in its “native” size?Well, technically, the IDE is still there, but you can make it either invisible on startup or absolutely inaccessible. Snap! written in Javascript, so the programs made on it can be embedded in web pages without the Snap IDE? How can I do this with my students?
There are several ways to include a pointer to a project in the URL when starting Snap! in order to load a project automatically. You can think of such a URL as just running the project rather than as running Snap!, especially if the URL says to start in presentation mode and click the green flag. The general form isThe “verb” above can be any of open, run, cloud, or present. The last two are for shared projects in the Snap! cloud; the first two are for projects that have been exported and made available anywhere on the Internet.http://snap.berkeley.edu/run#verb:project&flag&flag…
Here’s an example that loads a project stored at the Snap! web site (not the Snap! cloud!):The project file will be opened, and Snap! will start in edit mode (with the program visible). Using #run: instead of #open: will start in presentation mode (with only the stage visible) and will “start” the project by clicking the green flag. (“Start” is in quotation marks because there is no guarantee that the project includes any scripts triggered by the green flag. Some projects are started by typing on the keyboard or by clicking a sprite.)http://snap.berkeley.edu/run#open:http://snap.berkeley.edu/snapsource/Examples/vee.xml
If the verb is run, then you can also use any subset of the following four flags:
&editMode Start in edit mode, not presentation mode.
&noRun Don’t click the green flag.
&hideControls Don’t show the row of buttons above the stage
(edit mode, green flag, pause, stop).
&noExitWarning When closing the window or loading a different
URL, don’t show the browser “are you sure you
want to leave this page” message.
Last edited by simple_schoolteacher (April 2, 2018 16:49:50)
- bharvey
- Teacher
1000+ posts
Snap! user discussion
The whole point of presentation mode is to fill the screen with the stage! Snap Snap! you can change the size of Stage, but in presentation mode its size is still adjusted to the size of the screen. Is there a way to show stage in its “native” size?! will preserve the aspect ratio of your changed stage size, but not the absolute size.
- s_federici
- Scratcher
500+ posts
Snap! user discussion
No, sorry. You can't do that. I thought you had Scratch 2 projects you wanted to run in a webpage without using Flash. How can I convert a Snap! app with homemade blocks in Scratch 2?
But, if you don't mind giving it a try, you can test “Desnapifier” (https://github.com/Jonathan50/desnapifier), a python script that will convert Snap! projects to Scratch 2. I never tested it myself, but the webpage says “desnapifier is currently only able to convert very simple Snap! projects”.
- Jonathan50
- Scratcher
1000+ posts
Snap! user discussion
It doesn't even convert custom blocks yet (and I haven't looked at it in ages) so it probably won't do what you want… No, sorry. You can't do that. I thought you had Scratch 2 projects you wanted to run in a webpage without using Flash.
But, if you don't mind giving it a try, you can test “Desnapifier” (https://github.com/Jonathan50/desnapifier), a python script that will convert Snap! projects to Scratch 2. I never tested it myself, but the webpage says “desnapifier is currently only able to convert very simple Snap! projects”.
Not yet a Knight of the Mu Calculus.