(you do not need to download and install any program (except the Adobe Flash player) to use FS2LSL)
Flash Scratch to Linden Scripting Language
FS2LSL is a web-based programming environment intended to simplify the creation of the Linden Scripting Language (LSL) programs used to imbue Second Life (or OpenSim) objects with behavior, and to help you get started developing these programs. LSL is in the C family of languages, and is distinguished by its inclusion of state as a built-in feature. Many (but certainly not all) LSL library functions are supported, and in particular, all of the functions needed to implement the coding http://inworks.ucdenver.edu/jkb/fs2lsl/Examples in the first five chapters of Scripting Your World: The Official Guide to Second Life Scripting, by Dana Moore, Michael Thome, and Karen Haig, are supported.
You create a program by dragging blocks from the palette onto the stage (the center part of the grey window). Once on the stage, any block with a menu option has that option highlighted in yellow. At any time, you can press Generate LSL to translate your block-defined program to Linden Scripting Language and display the LSL for your program in the LSL script window. The LSL script window is editable. You can also choose to view or hide the XML intermediate language. This XML is also editable, and changes made in the XML window can be converted back to blocks by selecting Load Program from XML Window from the File menu. The Save Program to XML Window menu item translates the block representation to the XML representation. Normally you will not need to use the XML window, but it is a great way to update an FS2LSL program from a prior version (which is occasionally required). You can also save and load your work to/from a file using the File menu (the saved file is just the contents of the XML window.)
You can choose to see all of the features of FS2FSL, or just the basic ones, by clicking on Show Basic or Show Advanced. Some LSL features are not supported by OpenSim. To restrict the use of such features, select Coding for OpenSim. Coding for SL removes these restrictions (this feature is not yet fully implemented).
FS2LSL was originally created to be used in a first year course in computer science for non-majors and majors. It is intended to bridge the sometimes substantial gap between "I understand how to think computationally" and "I am able to express that understanding using a programming language in a syntactically correct manner." FS2FSL builds upon the Scratch for Second Life (S4SL) work of Eric Rosenbaum of the MIT Media Lab Lifelong Kindergarten Group, which in turn builds upon Scratch, which in turn builds upon Squeak, which in turn builds upon Smalltalk 80, etc. Portions of the AS3 source code for FS2LSL were derived from code created by John Maloney, Evelyn Eastmond and Eric Rosenbaum, all of the MIT Media Lab. Many thanks to Eric and his colleagues for making this code available.
John K. Bennett
CU Denver | Anschutz Medical Campus
Version 1.0 corrects a few minor issues and adds support for switch statements, which will only work with the Firestorm Viewer (when enabled), or other viewer that supports C-style switch/case statements. Most of the code http://inworks.ucdenver.edu/jkb/fs2lsl/Examples require version 0.81 or later.
Examples of FS2LSL programs you can download and import (most of these examples use features of V0.81)
The following FS2LSL http://inworks.ucdenver.edu/jkb/fs2lsl/Examples implement all of the LSL programming http://inworks.ucdenver.edu/jkb/fs2lsl/Examples from the first five chapters of Scripting Your World: The Official Guide to Second Life Scripting, by Dana Moore, Michael Thome, Karen Haigh. This is an excellent book, well worth the $27.00 investment.
FS2LSL Source Code
Source Code for FS2LSL (Flash Scratch to LSL) by John K. Bennett is available for non-commercial use under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unsupported License (http://creativecommons.org/licenses/by-nc-sa/3.0/).
For access to FS2LSL Source code, contact the author: email@example.com
FS2LSL was built using Adobe Flash Builder 4.5 (Standard), but will build successfully with 4.6 or 4.7.
Questions, comments, new FS2LSL http://inworks.ucdenver.edu/jkb/fs2lsl/Examples (and especially bug reports that are reproducible) should be sent to firstname.lastname@example.org