what is the deal with a / vs a \ in the codebase attribute?
I had trouble with "class not found" errors until I changed it to just
codebase="."
could this be the source of some folks problems?
Dave
Offline
Addy112 wrote:
Hi, I always thought that a website is actually very costly to make if one gets it done by a programmer or a web designer. But actually when I leart it I found that it's **** easy and does not cost much except for the domain name registration.
Don't post inappropriate language
Offline
Addy112 wrote:
Hi, I always thought that a website is actually very costly to make if one gets it done by a programmer or a web designer. But actually when I leart it I found that it's * easy and does not cost much except for the domain name registration.
Depends on how you do it really. You can get freelancers from foreign countries fairly cheaply. Easy way to build up your workforce without too much expenditure.
Offline
I tried this, but it didn't work. Does the fact that my website is on markdown instead of html affect anything?
Is there any other thing I might be doing wrong?
My code looks like
<html>
<body>
<applet id="ProjectApplet" style="display:block" code="ScratchApplet" codebase="./" archive="ScratchApplet.jar" height="387" width="482">
<param name="Halloween RPG" value="Halloween RPG.sb">
</applet>
</body>
</html>
and I have the project called "Halloween RPG.sb" in a folder on my desktop as well as one called code, one called scratch applet, and one called soundbank.gm. Does anyone know what I can do?
Offline
I have installed Scratch 1.3 and tried to show scratch projects in web page. I can successfully show project created by me (very simple one with couple of blocks) BUT none of the sample projects which come with scratch installation. All of them show the same error "NullReferenceException was unhandled" (this is when running web pages in the Visual Studio) and simply show nothing (just loading bar) when running standalone. In order to show scratch projects I use the way you suggest here in this topic (applet).
Offline
For what nick said, is there any way to get it on to a server (without posting it on this website) where the website isn't actually a html text file?
Offline
@FlickenMaste
First open notepad(if on windows)
click file >.> save as >.> File name = "Anything.htm" >.> Save as type = "All files(".") >.>now save in the folder with the two other files
now type in your new htm doucument this:
<html>
<head>
<title>
Anything
</title>
</head>
<body>
<applet id="ProjectApplet" style="display:block" code="ScratchApplet" codebase="./" archive="ScratchApplet.jar" height="387" width="482">
<param name="project" value="testproject.sb">
<!-- Changing the value "testproject.sb" to the name of your project (.sb) //-->
Here is the scratch project!
</body>
</html>
Now save the file and open it in IE or Firefox or whatever.
P.S. Don't forget to put your scratch project in the folder!
Last edited by Buddy_ca111 (2008-11-04 22:47:01)
Offline
spencer8ab wrote:
I would suggjest just searching for "convert javascript to exe" because when I searched for that a lot of options came up like html and java script to exe you could use the java script from scratch projects and convert it to exe. Hope this helps!
Javascript is an almost completely separate language from Java, which is built into the web browsers themselves. So many of the results might be misleading. Try searching for Java applet to EXE, or Java applet to JAR (JAR is like an EXE for Java applets, and on operating systems with Java installed, can usually be double clicked on like a normal Windows app). Alternatively, a program could be made to convert the SB files to JAR.
Offline
does emedding scratch games into moodle websites work inthe same way as iam having problems it just says a fatal error occured
thanks
Offline
Hm...I haven't read everything in the thread but as for all the questions about SWF, EXE, AVI, exporting, I think it would be too hard to implement. You can create SWFs with Adobe Flash, the current version CS3 (CS4 is coming soon! I have the beta of Photoshop CS4!), and export them to your own website online without much difficulty. Scratch files are seemingly based on Java, or can be played with that Java application. That being said, the ability to export to JARs shouldn't be too hard to implement and would allow for easier embedding without having to download and periodically updating the Scratch player. Something that would be better is if the start and stop icons could be taken off when exporting to JAR. This way, novice developers who wish to create games in JAR could learn the basic concepts of programming without having to delve into the language.
Although...even though I'm sure it'll take quite a bit of rewriting, if you COULD export to SWF that would simply be fantastic. SWFs are more lightweight and don't require the Java VM starting up. All modern browsers automatically come with the plugin, too. I believe this will greatly increase the popularity of Scratch, releasing limitations of uploading to the Scratch site.
Anyway, I love what you guys at MIT are doing, keep it up!
Hopefully I'll be there in a couple years.
Last edited by osama777 (2008-11-19 17:25:01)
Offline
afurlong wrote:
Hi,
I added my java applet and added my game. It shows my game window but it says Loading Java Applet Failed...
What do I do?
Well, search around the forums for how to change your Java memory settings. This could be one issue. Also check your HTML code, maybe something is wrong there.
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.wik.is/Publishing_your_S … 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
I clicked on both of these links and IE 8 returned the error: The website denied access. How can I get past this?
Offline
bourd wrote:
when i try to put on my web page i see this ----------------------------------------------------
load: class ScratchApplet not found.
java.lang.ClassNotFoundException: ScratchApplet
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
load: class ScratchApplet not found.
java.lang.ClassNotFoundException: ScratchApplet
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
load: class ScratchApplet not found.
java.lang.ClassNotFoundException: ScratchApplet
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
load: class ScratchApplet not found.
java.lang.ClassNotFoundException: ScratchApplet
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
load: class ScratchApplet not found.
java.lang.ClassNotFoundException: ScratchApplet
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file ScratchApplet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I got this too!
Offline
How do I check the Java memory settings?
I also saved a page that someone put their game on and changed the file name to Mario.sb which is my game. Did I do anything wrong?
Offline
I got it too!
load: class ScratchApplet not found.
java.lang.ClassNotFoundException: ScratchApplet
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
load: class ScratchApplet not found.
java.lang.ClassNotFoundException: ScratchApplet
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
load: class ScratchApplet not found.
java.lang.ClassNotFoundException: ScratchApplet
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
load: class ScratchApplet not found.
java.lang.ClassNotFoundException: ScratchApplet
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
load: class ScratchApplet not found.
java.lang.ClassNotFoundException: ScratchApplet
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file ScratchApplet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Offline
I have just looked at the comments about embedding Scratch projects in a website and it is all working beautifully, so thank you for that. My question is... is there anyway that the project notes can be included in the applet, as the children I am working with are writing instructions for the user.
Any help would be appreciated. Thank you.
Offline
this probably is not the cause to your problem, but i noticed that the HTML finkde posted is deprecated in HTML 4. i dont know the proper HTML for it but i think its the object tag. i am not sure though
Last edited by charlei12331 (2008-12-04 10:49:30)
Offline
that wouldn't work as interactive things such as games would lose all interactivity and everything would basically become a video.
Offline
Robert-1478 wrote:
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
please do not post off topic in the forums. try putting this elsewhere where it is on-topic. If you cannot find anywhere where it is, make your own topic about what you ant to talk about!
Offline
weel this is not the best way to do it is what i think. But when you put on other sites, then you have to get the download from the the sit e and the scratch web i think you should put it on the disk go on a diffrent pc or mac (make sure that if you are on apc or mac do not put it on the opeset kind of competer). also mt laptop is not that good and there are a sit that i reaaly want to put it on do i have to download all that software?
thank you alot for advise
blockio500 (i messed uo signing up it is blocko500).
>
Offline
My little game works on my website, except the variables don't show! I have a variable called Hits, and show this on the game as it is playing. It works fine in Scratch and on the Scratch website but it doesn't show up on my website.
Any ideas why or solutions?
Thanks
Offline