Discuss Scratch

bharvey
Scratcher
1000+ posts

Snap! user discussion

xly wrote:

I am now often using local Snap! with Windows.
In which directory are stored my “local” Snap! projects ?
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.

bharvey
Scratcher
1000+ posts

Snap! user discussion

s_federici wrote:

The BYOB application and the BYOB.image are both in the Applications folder, inside the “BYOB 3.1 Mac” folder.
That should work. I think I vaguely recall that after an OS upgrade I had to local the image file once, but after that it worked without complaint. Anyone else running BYOB on a Mac?

cycomachead
Scratcher
100+ posts

Snap! user discussion

bharvey wrote:

s_federici wrote:

The BYOB application and the BYOB.image are both in the Applications folder, inside the “BYOB 3.1 Mac” folder.
That should work. I think I vaguely recall that after an OS upgrade I had to local the image file 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

cycomachead wrote:

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

s_federici wrote:

cycomachead wrote:

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

cycomachead wrote:

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
Scratcher
1000+ posts

Snap! user discussion

cycomachead wrote:

I feel like there's some issue with the sandboxing rules on macOS
There's sandboxing for standalone programs?

comp09
Scratcher
1000+ posts

Snap! user discussion

bharvey wrote:

cycomachead wrote:

I feel like there's some issue with the sandboxing rules on macOS
There's sandboxing for standalone programs?
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.


Visit the website of Andrew Sun!


simple_schoolteacher
New to Scratch
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

simple_schoolteacher wrote:

Snap! written in Javascript, so the programs made on it can be embedded in web pages without the Snap IDE?
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.

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 to Scratch
11 posts

Snap! user discussion

s_federici wrote:

simple_schoolteacher wrote:

Snap! written in Javascript, so the programs made on it can be embedded in web pages without the Snap IDE?
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.

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.
How do I force stage in presentation mode to hold a specified size?

Last edited by simple_schoolteacher (March 30, 2018 16:49:01)

simple_schoolteacher
New to Scratch
11 posts

Snap! user discussion

s_federici wrote:

simple_schoolteacher wrote:

Snap! written in Javascript, so the programs made on it can be embedded in web pages without the Snap IDE?
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.

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.
How can I convert a Snap! app with homemade blocks in Scratch 2?
simple_schoolteacher
New to Scratch
11 posts

Snap! user discussion

s_federici wrote:

simple_schoolteacher wrote:

Snap! written in Javascript, so the programs made on it can be embedded in web pages without the Snap IDE?
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.

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.
This was written in this forum, only before?
bharvey
Scratcher
1000+ posts

Snap! user discussion

comp09 wrote:

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
Scratcher
1000+ posts

Snap! user discussion

simple_schoolteacher wrote:

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?
Well, technically, the IDE is still there, but you can make it either invisible on startup or absolutely inaccessible.

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…
The “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.

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
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.)
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
(Note that “Username” and “ProjectName” are TitleCased, even though the flags such as “noRun” are camelCased. Note also that a space in the project name must be represented in Unicode as %20.) The verb present behaves like run: it ordinarily starts the project in presentation mode, but its behavior can be modified with the same four flags as for run. The verb cloud (yes, we know it’s not a verb in its ordinary use) behaves like open except that it loads from the Snap! cloud (with Username and ProjectName instead of a URL) rather than from the Internet in general.

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 to Scratch
11 posts

Snap! user discussion

bharvey wrote:

simple_schoolteacher wrote:

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?
Well, technically, the IDE is still there, but you can make it either invisible on startup or absolutely inaccessible.

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…
The “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.

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
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.)
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.

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?

Last edited by simple_schoolteacher (April 2, 2018 16:49:50)

bharvey
Scratcher
1000+ posts

Snap! user discussion

simple_schoolteacher wrote:

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?
The whole point of presentation mode is to fill the screen with the stage! Snap! will preserve the aspect ratio of your changed stage size, but not the absolute size.

s_federici
Scratcher
500+ posts

Snap! user discussion

simple_schoolteacher wrote:

How can I convert a Snap! app with homemade blocks in Scratch 2?
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”.
Jonathan50
Scratcher
1000+ posts

Snap! user discussion

s_federici wrote:

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”.
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…

Not yet a Knight of the Mu Calculus.

Powered by DjangoBB