Hi,
I'd really like to use Scratch for development of sketches to use in my eLearning pieces for work. What would be ideal would be if Scratch allowed me to export to an swf flash file. It looks like I can only point people at the web site though which isn't ideal as I'd want to put content in that is confidential.
Is this something I can do now or something in development for the future?
Many thanks.
MS-R
Last edited by coolstuff (2010-07-14 17:33:20)
Offline
Hi!
There's actually a way to share scratch projects on your website or in a folder on a CD or computer without posting them to scratch.mit.edu first. To do it, you need to download the following files to the directory on your website (or a folder on your computer):
1. http://scratch.mit.edu/static/misc/ScratchApplet.jar
2. http://scratch.mit.edu/static/misc/soundbank.gm
(for soundbank.gm, if you're using firefox, right-click and select "Save Link As..." to download)
After copying these to a folder on your computer, put the .sb file in the same folder. Then, create a .htm file with the following contents:
<html> <body> <applet id="ProjectApplet" style="display:block" code="ScratchApplet" codebase="./" archive="ScratchApplet.jar" height="387" width="482"> <param name="project" value="testproject.sb"> </applet> </body> </html>
replacing testproject.sb with the name of the project you want to view. This will allow you to either view scratch projects offline (in a folder) or online (on a webserver).
You can view an example of this in action here:
http://web.media.mit.edu/~nbushak/test.html
Additional methods of embedding Scratch projects are detailed here:
http://info.scratch.mit.edu/Publishing_ … r_websites
Also, we release new versions of ScratchApplet.jar occasionally for bug fixes. If you're using this a lot, it may be a good idea to stay updated by periodically downloading new versions of ScratchApplet.jar from the website.
Nick
Offline
Hi!
In addition to what Nick wrote, you can also run your Scratch projects from a CD. Just put your projects plus the following files on a CD:
Scratch.exe
Scratch.image
Scratch.ini
ScratchPlugin.dll
Mpeg3Plugin.dll
license.txt
If will you need to run the CD on Mac's, you should also add the file:
Scratch.app
which you can get from the Macintosh version of Scratch.
To run a project off the CD, double-click on Scratch.exe (or Scratch.app), then click the "open" button and pick your project.
I hope that helps!
-- John
Offline
Here's a bit more info along the lines of your SWF query.
http://scratch.mit.edu/forums/viewtopic.php?id=244
Scott
Offline
I could not download those file---got a fatal something error--any ideas
Offline
Hey,
i would like to use scratch for some of my projects, plus i have a few good ideas so could i be an idea manager or something. thank you.
robert
Offline
Using the html for the applet works fine from my hard disk but not from my webserver (which is locked down to allow only ports 80 and 443). The applet appears with the loading bar which justs stands still. Am I doing something wrong ?
Offline
I would suggest hosting the Scratch project on the Scratch website and just linking to it from your website. One of the members of the community (xyxzergames) was able to do it by following the instructions on:
http://scratch.wik.is/Publishing_your_Scratch_projects_on_other_websites
This is xyxzergames home page:
http://xyxzer.bravehost.com/scratchpad/Use%20Online.html
Offline
Thanks, but that is a so-so solution. I am thinking of using scratch in a school computer club and some of the projects look like they get quite big. It would be nicc to host locally on a webserver and avoid eating up too much bandwidth.
The test web page (http://web.media.mit.edu/~nbushak/test.html) works fine. It is fine off my hard disk, but not off the server. Perhaps it is my browser configuration although I do notice a bit of additional javascript on the scratch server. Am I missing something ?
Offline
I'm also trying to host Scratch programs on our webserver. We're a primary school, and it would be nifty to be able to showcase pupils work without having them all start their own Scratch accounts.
I added the JAR and Soundbank files to our server and set up a test page in html.
The test page I created shows the bare scratch applet window, but gets stuck at the point of loading the testproject.sb file I put in the same web folder.
Any suggestions?
Offline
bibbleycheese wrote:
The test page I created shows the bare scratch applet window, but gets stuck at the point of loading the testproject.sb file I put in the same web folder.
Any suggestions?
Is this true for all browsers? I initially had this problem (on a Mac) with FireFox although Safari would load it without a problem. Without adjusting anything it seems to have automagically resolved the problem and now loads into FireFox etc. too.
Offline
Here you are, a link to the web page I am working on http://www.crockhamhill.kent.sch.uk/scratch/index.htm
I've tried viewing this in Internet explorer and Firefox on different PCs and for me the result is the same - the Scratch applet launches, begins loading the .sb file, then sticks.
I don't know what I'm doing wrong here but maybe someone clever out there can spot my problem?
Interestingly enough, I've been trying to view uploaded projects on the main Scratch site this evening using a friend's AOL browser. We found the files seemed to get stuck, but would launch if you clicked the link for a particular file a second time.
I did wonder if there are variations in the way JAVA handles the applet, and whether in my situation Java was caching parts of downloaded files and causing a blockage?
Anyway, when I got home I tried refreshing the page but still no go. Am I doing something obviously wrong?
Offline
Try 2 things:
1) eliminate the codebase="http://www.crockhamhill.kent.sch.uk" line
2) replace ../testproject.sb with testproject.sb
I think the second thing is your problem---you are trying to go up a directory to find testproject.sb, and that isn't where it is.
Offline
nick wrote:
Hi!
There's actually a way to share scratch projects on your website or in a folder on a CD or computer without posting them to scratch.mit.edu first. To do it, you need to download the following files to the directory on your website (or a folder on your computer):
1. http://scratch.mit.edu/static/misc/ScratchApplet.jar
2. http://scratch.mit.edu/static/misc/soundbank.gm
(for soundbank.gm, if you're using firefox, right-click and select "Save Link As..." to download)
After copying these to a folder on your computer, put the .sb file in the same folder. Then, create a .htm file with the following contents:Code:
<html> <body> <applet id="ProjectApplet" style="display:block" code="ScratchApplet" codebase="./" archive="ScratchApplet.jar" height="387" width="482"> <param name="project" value="testproject.sb"> </applet> </body> </html>replacing testproject.sb with the name of the project you want to view. This will allow you to either view scratch projects offline (in a folder) or online (on a webserver).
You can view an example of this in action here:
http://web.media.mit.edu/~nbushak/test.html
Additional methods of embedding Scratch projects are detailed here:
http://scratch.mit.edu/pages/embed
Also, we release new versions of ScratchApplet.jar occasionally for bug fixes. If you're using this a lot, it may be a good idea to stay updated by periodically downloading new versions of ScratchApplet.jar from the website.
Nick
I see what u are saying but i still dont get how u make it into a HTML file.
Offline
I am have uploaded my sb file (SpaceInvaders.sb) to a web server along with invaders.html, soundbank.gm and ScratchApplet.jar
http://www.goglebe.co.uk/scratch/invaders.html
It just sticks on the loading screen. Any suggestions?
Please help!
Art
Offline
I checked and you don't have your sb file in the same directory. I tried going here http://www.goglebe.co.uk/scratch/SpaceInvaders.sb and it returned "page not found"
Offline
andresmh wrote:
I checked and you don't have your sb file in the same directory. I tried going here http://www.goglebe.co.uk/scratch/SpaceInvaders.sb and it returned "page not found"
The file is definitely there. I have checked with my ftp software. Does the webserver have to have .sb as a recognised MIME type before it will allow users to get the file?
Art
Offline
have you checked to make sure that the .sb file is publically readable? web servers can only access publically readable files.
Offline
You shouldn't have to set the Mime Type to anything specific. Our website does set the MimeType but that is just so when an .sb file is clicked it opens in Scratch.
Offline
Is there anyway I can convert Scratch projects to exe files?
Offline
The "Is there anyway I can convert Scratch projects to exe files?" should be on the FAQ, as it has been asked several times. The answer is "no", but there are ways to incorporate scratch programs on arbitrary web sites.
Offline