Visit the Scratch website.

Scratch Extension
Vendor
MindTouch
Type Script
Categories Media
Requires MindTouch Core 1.8.3 or later
Status Stable
License Free/Open Source
Manifest http://scripts.mindtouch.com/scratch.xml

 

Install Script
To add  this script to your site, enter the address of your MindTouch installation (ex: http://www.mindtouch.com) and click the Add Script button.  This will open your control panel and prepopulate the necessary values.  You will still need to manually add configuration settings if required.  Note that no changes are made to your site until you confirm the action in your control panel.
Your site address:     


Table of Contents

Description

This extension contains functions for embedding Scratch applications.

See also How to add a script, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.


Functions

scratch(id : str, width : num, height : num) : xml

Embed a Scratch application.

Parameters:

NameTypeDescription
idstrApplication User/ID.
widthnum(optional) Application width. (default: 482)
heightnum(optional) Application height. (default: 387)


Script Source

<extension>
  <title>Scratch Extension</title>
  <label>Scratch</label>
  <copyright>Copyright (c) 2006-2009 MindTouch Inc.</copyright>
  <description>This extension contains functions for embedding Scratch applications.</description>
  <uri.help>http://developer.mindtouch.com/App_Catalog/Scratch</uri.help>
  <uri.logo>http://scripts.mindtouch.com/logos/scratch-logo.png</uri.logo>

  <function>
    <name>scratch</name>
    <description>Embed a Scratch application.</description>
    <param name="id" type="str">Application User/ID.</param>
    <param name="width" type="num" optional="true">Application width. (default: 482)</param>
    <param name="height" type="num" optional="true">Application height. (default: 387)</param>
    <return>
      <html xmlns:eval="http://mindtouch.com/2007/dekiscript">
        <body>
          <applet id="ProjectApplet" style="display:block" code="ScratchApplet" codebase="http://scratch.mit.edu/static/misc" archive="ScratchApplet.jar" eval:width="web.size(args.width ?? 482)" eval:height="web.size(args.height ?? 387)">
            <param name="project" eval:value="'../../static/projects/' .. args.id .. '.sb'" />
          </applet>
          <a eval:href="'http://scratch.mit.edu/projects/' .. args.id">Learn more about this project</a>
        </body>
      </html>
    </return>
  </function>
</extension>


Samples

  Output

To embed a Scratch application using the defaults:

{{ scratch("kuri/58059") }} 
./scratch.png

 

Tag page

Files 2

FileSizeDateAttached by 
 scratch.png
Scratch Widget
17.64 kB20:44, 27 Dec 2007SteveBActions
scratch.xml
XML source file
1334 bytes05:25, 18 Dec 2007SteveBActions
You must login to post a comment.