Home | Tools
Here is a step-by-step recipe for the equivalent of a "hello world"
program in Runtime Revolution www.runrev.com
Start Rev. The main menu bar is the horizontal set of menus and buttons
with window title "Revolution. Under File menu in the main menu bar
select New Mainstack. "Stack" is the Rev name for "program" although a
stack is much more than a computer program - it can contain graphics
and
other objects.
On the Tools palette, select the edit tool - the right button in pair
of buttons at top of Tools (icon is an arrow cursor
with + to lower-right).
Click and drag a button onto the new stack window - either of the pair
of buttons under the browse-edit tool pair of buttons.
Click and drag a text field onto the new stack window, e.g., a
scrolling field just under the Label: field.
Using the edit tool, click and select the button. Then click on the
Script button in the horizontally arranged Revolution menu bar. The
script window for your button should open.
Enter this script into the script window:
on mouseUp
put empty into field 1
wait 30 ticks -- 60 ticks per second
put "hello world" into field 1
end mouseUp
Comments can start with either -- or #
Click the "Apply" button at the bottom right of the script window. This
compiles the script to a cross-platform "byte code" and you will get
error messages if there are errors (a similar byte code approach is
taken in Java). Close the script window.
On the Tools palette, select the browse tool (cursor without the + to
lower-left, the edit tool has the +).
Now click the button on your stack.
After a wait of 1/2 second, "hello world" should appear in the field.
To give the stack a name other than "Untitled", click on the Inspector
button in the main menu bar.
To save the stack to a "stack file," which contains a main stack and
any
of its substacks, click on File > Save in the main menu bar.