This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-01-25 20:36:02

dehrha02
Scratcher
Registered: 2007-05-18
Posts: 19

embedded projects on web page

Is there any reason why I can't get two embedded projects to work on a webpage.

1 works and the other one just gets a JAVA symbol.  When I put them on their own webpage however-they work fine.

Offline

 

#2 2008-01-25 21:31:33

MITscratcher
Scratcher
Registered: 2007-09-16
Posts: 100+

Re: embedded projects on web page

First of all - You do have Java
Second of all - I don't believe that you can embed projects on any website; Sometimes it may not work. I suggest contacting the Scratch Team.


http://scratch.mit.edu/projects/MITscratcher/235497
                    ^ My NEW Snake Game! ^

Offline

 

#3 2008-01-26 07:22:42

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: embedded projects on web page

The embedding process that scratch uses runs a java applet.  I don't think that most web browsers support running multiple applets at the same time from the same page.

Offline

 

#4 2008-01-26 14:23:53

andresmh
Scratch Team at MIT
Registered: 2007-03-05
Posts: 1000+

Re: embedded projects on web page

Embedding works but only one project per page.


Andres Monroy-Hernandez | Scratch Team at the MIT Media Lab
on identi.ca and  twitter

Offline

 

#5 2008-01-26 15:17:20

dehrha02
Scratcher
Registered: 2007-05-18
Posts: 19

Re: embedded projects on web page

Thanks all, I appreciate the replies.

Offline

 

#6 2008-02-08 04:03:03

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: embedded projects on web page

andresmh wrote:

Embedding works but only one project per page.

Why is this? Is this a limitation that can be overcome? Or this is due to some basic decision taken at design time?

Offline

 

#7 2008-02-08 09:52:06

andresmh
Scratch Team at MIT
Registered: 2007-03-05
Posts: 1000+

Re: embedded projects on web page

s_federici wrote:

andresmh wrote:

Embedding works but only one project per page.

Why is this? Is this a limitation that can be overcome? Or this is due to some basic decision taken at design time?

Actually, it was a technical limitation that as of two days ago has been resolved. So now you can embed multiple projects on a page. I'd suggest not putting too many because Java is a bit heavy and I suspect running a lot projects might slow down your system considerably.


Andres Monroy-Hernandez | Scratch Team at the MIT Media Lab
on identi.ca and  twitter

Offline

 

#8 2008-06-18 13:41:01

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: embedded projects on web page

andresmh wrote:

Actually, it was a technical limitation that as of two days ago has been resolved. So now you can embed multiple projects on a page.

Thanks!

PS: Should I download a new version of Scratch plugin?

Last edited by s_federici (2008-06-18 13:41:50)

Offline

 

#9 2008-06-19 11:25:57

andresmh
Scratch Team at MIT
Registered: 2007-03-05
Posts: 1000+

Re: embedded projects on web page

There is no such thing as the Scratch plugin. You proably mean the Scratch Java player  smile


Andres Monroy-Hernandez | Scratch Team at the MIT Media Lab
on identi.ca and  twitter

Offline

 

#10 2008-06-19 11:32:53

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: embedded projects on web page

andresmh wrote:

There is no such thing as the Scratch plugin. You proably mean the Scratch Java player  smile

Actually there is  big_smile  the scratchplugin.dll from the Scratch program .)

Why did you called everything Scratch?
The "program", the Java Player, This website, other strage scratch related plugin files, annoying .db files dumped everywhere on my pc  big_smile


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#11 2008-06-19 12:14:06

dbal
Scratcher
Registered: 2007-07-19
Posts: 100+

Re: embedded projects on web page

andresmh wrote:

s_federici wrote:

andresmh wrote:

Embedding works but only one project per page.

Why is this? Is this a limitation that can be overcome? Or this is due to some basic decision taken at design time?

Actually, it was a technical limitation that as of two days ago has been resolved. So now you can embed multiple projects on a page. I'd suggest not putting too many because Java is a bit heavy and I suspect running a lot projects might slow down your system considerably.

I recently learned from experience that putting multiple links to existing Scratch applets on the same web page places a heavy drain on the computer.  (They all ran concurrently under FireFox)  This happens because Scratch applets start running as soon as the applet loads, and having multiple applets running at the same time was just about more than my cheap HP laptop could accommodate.

For anyone who may be interested, I moved the links to the applets onto separate html files in the same folder and then used the following code to make it possible for the reader to open those pages in a new window and view the applets individually:

<p>
<b><a name="Figure_1">Figure 1</a>. Rushes with sun by pandalecteur.</b>
<table border="1" cols="1" bgcolor="#ffffff" id="table1" >
  <tbody>
    <tr>
      <td>
<p><img border="0" src="hs10000a04.jpg" width="483" height="389"></p>
<a href=Hs10000Fig1.htm  target="_blank">Click here to view the applet. Close the page when finished viewing.</a>
      </td>
    </tr>
  </tbody>
</table>
</p>

This causes a static screen shot of the applet to appear in the main web page with a link to the auxiliary page, along with some instructions that appear immediately below the image.  It works pretty well and produces a pleasing visual effect in the document. I will be publishing the article containing this material soon.

The html on the auxiliary page that actually causes the applet to run looks like this:
<p>
<b>Figure 1. Rushes with sun by pandalecteur.</b><table border="0" cols="1" bgcolor="#EFE9B8" id="table1" >
  <tbody>
    <tr>
      <td>
<applet id='ProjectApplet' style='display:block' code='ScratchApplet' codebase='http://scratch.mit.edu/static/misc' archive='ScratchApplet.jar' height='387' width='482'><param name='project' value='../../static/projects/pandalecteur/122328.sb'></applet>
      </td>
    </tr>
  </tbody>
</table>
</p>
<p>Note, if you don't see the animation running in the box above, that probably
means that Java is not installed on your computer.</p>
<p>Be sure to close this page or at least click the red button to ensure that
the applet doesn't continue running after you leave the page.</p>

Of course, if the user starts several of the applets running at the same time, this won't keep the applets from loading down the computer.  Therefore, I provided instructions for the viewer to either close the applet page or at least click the red button before leaving the applet page.

Last edited by dbal (2008-06-19 12:15:08)


Dick Baldwin - Don't get stuck scratching. When you master Scratch, move on up to more serious programming languages. Free online programming tutorials:
Scratch - Alice - Java - C# - C++ - JavaScript - XML - Python - DSP

Offline

 

#12 2008-06-19 23:40:13

andresmh
Scratch Team at MIT
Registered: 2007-03-05
Posts: 1000+

Re: embedded projects on web page

JSO wrote:

andresmh wrote:

There is no such thing as the Scratch plugin. You proably mean the Scratch Java player  smile

Actually there is  big_smile  the scratchplugin.dll from the Scratch program .)

Why did you called everything Scratch?
The "program", the Java Player, This website, other strage scratch related plugin files, annoying .db files dumped everywhere on my pc  big_smile

You're right! There is a file with that name. However, the file is I believe only related to the implementation of specific OS-dependent features, it is not related to being able to see a project on the web. I just wanted to make clear that the only thing needed to interact with a Scratch project on the web is to have a Java-enabled browser (which actually is also sometimes called Java plugin).

I agree, we do use the name Scratch in a lot of places! I personally wish we could call things a bit differently but then I heard convincing arguments against it  smile


Andres Monroy-Hernandez | Scratch Team at the MIT Media Lab
on identi.ca and  twitter

Offline

 

Board footer