-
Notifications
You must be signed in to change notification settings - Fork 9
Quick Start
Xavier Mendez edited this page May 31, 2013
·
1 revision
The goal of this guide is to get up and running with a las3r repl as quickly as possible. We should end up with a .swf
file that displays a REPL when run. Here's the main class for our simple AS3 project:
package {
import flash.display.Sprite;
import com.las3r.repl.Repl;
public class Las3rTest extends Sprite {
public function Las3rTest() {
var repl:Repl = new Repl(500, 400, stage);
stage.addChild(repl);
repl.evalLibrary("(defn say-hello [] (println 'Hello World'))");
}
}
}
Next, grab the las3r.swc
from the dist
folder of the las3r distribution. Assuming we've got the Flex tools installed, we can now compile our SWF.
mxmlc -library-path+=PATH_TO_SWC/las3r.swc Las3rTest.as
You should now have Las3rTest.swf
. Launch this SWF and you'll see a las3r repl.
Input (say-hello)
and press enter to call the function we defined.
Have a look at the core library for more functions.