| ThingMaker Documentation Chapter 8) Actions Reference

| Actions Actions let you apply interactivity to your Things. Actions are moved from the Action Palette by dragging an Icon from the Action Palette to the Settings Palette for the Thing. The Action should be dragged to the appropriate State tab or to the Settings Tray. Most Actions can be applied to MouseOver and MouseClick, but some Actions can be applied to MouseClick only. If you drag an Action to the wrong place, ThingMaker will display an Error message and ask whether you want to place the Action in the appropriate state.

Actions can also be applied by dragging them directly to a Thing in the Scene Window. When you do this, ThingMaker will display the Message dialog asking if you want the Action to be placed in the appropriate state.

You can dock the Actions Palette to the Scene Window or let it float freely in the Scene Window. To undock the Tool bar , choose Preferences in the Edit menu.

Drag
With the Drag Action, a user can move Things in the Scene by clicking and dragging. The Drag Action only functions in the MouseClick state. You cannot add it to the Default or MouseOver state.

Limiting movement
If you add the Drag Action and set no parameters, the user can drag a Thing anywhere in the Scene; alternatively, you can set the Limit vertical and horizontal parameters to confine movement. When you do this, the region in which a Thing can be dragged is limited.

The Drag Action only applies when the scene is being played in ThingMaker or in ThingViewer. In Edit mode, you can still move the Thing anywhere in the Scene.

Limit vertical movement
Setting this parameter limits up and down drag. When this parameter is on, the Fields for up and down movements can be edited. A blue line appears in the Preview Window showing where the movement will be limited. The value is measured in pixels.

The parameter values actually indicate the distance you can drag the Thing from it's starting point in the Scene. For example, if you set the up value to 20 and the down to 0, then you will be able to drag the Thing up 20 pixels and down to the original starting point, but you won't be able to drag it below its starting point.

You can restrict the movement of the object to a rectangular area by setting the up/down and left/right parameters.

Limit horizontal movement
Setting this parameter limits the distance the Thing can move laterally. When this parameter is set, the left and right fields in the Settings Sheet can be edited. A blue line will appear in the Preview Window indicating where movement will be limited. The Field value is measured in pixels.

Dragging on a path
A Drag Action can also exist for a Thing that has had a Path added to the MouseClick state. If this is the case, the Drag Action works differently than in other instances, its parameters and its appearance change. When the Thing is dragged, it will move along the Path that's been established, rather than follow the cursor. If you set the parameter to drag left, then when the cursor drags left, the Thing will move "forward" along the path, since the Path is the determinant of the forwards and backwards parameters - even if the path is actually traveling left to right, and the Thing appears to move in the opposite direction to which the cursor is being dragged. The movement along the Path is based upon the speed at which you drag the cursor on the screen. It does not follow the cursor.

Up/down/left/right
This parameter indicates the direction the user will have to drag the cursor to move the Thing forward along a path. The actual direction that the Thing moves is determined by the Path, not by the direction in which you drag.

Cursor
The Cursor Action defines the shape of the cursor that interacts with a Thing.

- In the Scene, but not over a the cursor in ThingViewer is an arrow.

- When over a Thing the cursor changes to a hand.
- When over a Thing that is draggable, the cursor changes to a grabber hand.

  You can change these cursors using the Cursor Action. To choose a cursor, drag the Cursor Action to the State of the Thing you wish to change. Then choose the cursor shape that you want to appear when the cursor is moving over or clicking on the Thing. The Cursor Action overrides ThingMaker defaults. The Cursor Action can only be added to the MouseOver and the MouseClick states.

  Web Address
  The Web Address Action opens a Universal Resource Locator (URL) or Web address in the browser. This Action can be applied to either the MouseOver or MouseClick state. Use it to turn Things into navigation Buttons.

  If you add this Action to the MouseOver state, the MouseClick state of the Thing will not be exercised; as soon as the cursor is over the Thing, ThingViewer will tell your browser to open another page, which it will do, making it impossible for you to click on the Thing and execute any Actions attached to that state.

  Internet Address (URL)
  This is the Web address that browser will open. The address defaults to ThingWorld's URL, but you can change it to any valid address.

  When you test the Thing in ThingMaker, the program will display a message quoting the URL and give you the option to launch the URL in your Web browser. Note whether you have typed the URL correctly. If you are running the Scene in ThingViewer, the message will not be displayed.

  Comment
  Use this to store a note about the URL. This information won't be available in ThingViewer.

  Open in a new browser window
  Setting this parameter tells the browser to open the URL in a new browser Window and not the current one.

  Wait for end of Animation
  If this parameter is set, the Action won't be triggered until the Animation has played the number of times set. See also "Play to end of Sequence" in Chapter 7.

  Since the Status Text Action in the MouseOver state tells users where a Button will take them, you can use it to display a message such as "Click to go to ThingWorld."

  Mail Address
  The Mail Address Action is similar to the Web Address: it is an instruction that is executed by the Web browser. If your browser is set up to support it, this Action will open a mail form and fill in the "mail to" and "subject" fields.

  Mail to address
  Use this field to set up an email address, mail form, and subject line. By default, the field will contain the following:

  things@parablecorp.com?subject=Things
  Replace the first part of the line "things@parablecorp.com" with the address you want placed in the mail form. Replace the last part of the line "Things" with the subject you want to appear in the email form.

  Wait for end of Animation
  If this parameter is set, the Action won't be triggered until the Animation has played the number of times you set. See also "Play to end of Sequence" in Chapter 7.

  Since the Status Text Action in the MouseOver state tells users where a Button will take them, you can use it to display a message such as "Click to go to ThingWorld."

  Status text
  The Status Text Action displays a text message at the bottom of the browser Window. To use this Action, add it to either the MouseOver or the MouseClick States of the Thing and type the text that you want to appear in the browser Status Bar Text Field. Use the Status Text Action in the MouseOver state to provide feedback about where the Button will take the user.

  Since the Status Text Action in the MouseOver state tells users where a Button will take them, you can use it to display a message such as "Click to go to ThingWorld."

  Message Box
  The Message Box Action displays a Dialog box containing the text entered in the Message Box Settings page. The Action can be added to the MouseOver or to the MouseClick state.

  Caption
  The title for the message box displayed in the browser.

  Message text
  The body of the text displayed in the Message box.

  Wait for end of Animation
  If this parameter is set, the Action won't be triggered until the Animation has played the number of times you set. See also "Play to end of Sequence" in Chapter 7.

  Layer
  The Layer Action is used to change the order in which Things are drawn on the screen. Each Thing in the Scene is assigned to a unique layer when it is added to the Scene; the second Thing added will have a higher layer number, and will appear to be on top of - or above - the first Thing that was added to the Scene.

  Once the Scene is in playback mode, the Layer Action can be used to change the layer of a Thing temporarily for the rest of the Scene.

  The lowest layer is 0. The highest layer possible is 999. To set up the Layer Action, first add it to the MouseOver or the MouseClick state of a Thing. Next, choose the Thing that will be affected. The Settings Sheet will default to the Thing to which the Action was added, but you can choose to affect any other Thing in the Scene.

  When a Thing is capable of being dragged, you might use the Layer Action to move the Thing to the top or front layer, so that, while it is being dragged, it is on top of all the other Things in the Scene.

  (See also "Bring to Front" and "Send to Back" in the Menu Reference: Chapter Nine.)

  Move this Thing
  Clicking on the icon brings up a pop-up list of Things in the Scene. When a Thing is chosen, the name of that Thing appears in the text box above the Icon for the Thing. You can also type in the name of the Thing in the Text Field, instead of using the pop-up box.

  If you enter the name of the Thing, and there are two Things in the Scene with that name, the Thing that will be chosen is the first one in the pop-up list.

  To front
  Moves the Thing to the top of the Layer list. The Thing will be drawn on top of all other Things in the Scene.

  Forward x levels
  Moves the Thing a selected number of layers above it's current layer. If there are fewer layers in the scene than the number you have chosen, the Thing will be moved to the top-most layer.

  To level
  Moves the Thing to the selected layer number. Layers are numbered from 0 at the bottom to 999 at the top.

  Backward x levels
  Moves the Thing the selected number of layers, below it's current layer. If there are fewer layers in the scene than anticipated by this command, the Thing will be moved to the lowest layer.

  To back
  Moves the Thing to the bottom of the Layer list, so that the Thing appears below all other Things in the Scene.

  Reset to the original layer at the end of mouse event

  When the Layer Action is no longer in effect, the Layer change can revert to the original later. If you do not select this option, the Thing will stay in the new Layer.

  Wait for end of Animation
  If this parameter is set, the Action won't be triggered until the Animation has played the number of times you set. See also "Play to end of Sequence" in Chapter 7.

  While editing the Scene, use the menu commands Bring to Front, Send to Back, Bring Forward 1 Level, or Send Backward 1 Level from the Edit menu to change the layer of a Thing.

  Swap Things
  This Action switches the location, the visibility, and the layer properties of two Things. You can choose which of the properties are to be switched, as well as the two Things in the Scene which will switch their properties. (If no properties are chosen, the Swap action won't have any effect). The Swap action can be used to switch the parameters of the Thing containing the Action with another Thing in the Scene, or to switch the parameters of two other Things in the Scene. (See Tutorial 6 to learn how to use this function).

  Use Swap to create unexpected behaviors: for example, you can swap a Thing with a duplicate Thing that has different actions attached to it.

  Location
  Tells Swap to switch the Location properties of the two Things.

  Visibility
  Tells Swap to switch the Visibility properties of the two Things.

  Layer
  Tells Swap to switch the Layer properties of the two Things.

  Of this Thing
  Is one of the two Things acted upon by the Swap action. Click on this icon to get a pop-up list of the Things in the Scene, or type the name of the Thing in the field above the Thing icon.

  If you enter the name of the Thing, and there are two Things on the Scene with that name, the Thing that will be chosen is the first one in the pop-up list.

  With this one
  Is one of the two Things acted upon by the Swap action. Click on the icon to get a pop-up list of the Things in the Scene, or type the name of the Thing in the field above the Thing Icon.

  If you enter the name of the Thing, and there are two Things on the Scene with that name, the Thing that will be chosen is the first one in the pop-up list.

  Reset to the original setting at end of mouse event
  When the Swap Action is no longer in effect (i.e. the Thing containing the Swap Action changes state), the change in Location, Visibility and Layer can revert to the original settings. If this setting is not chosen, the changes will remain.

  Wait for end of Animation
  If this parameter is set, the Action won't be triggered until the Animation has played the number of times you set. See also "Play to end of Sequence" in Chapter 7.

  Hide/show
  Chooses whether a Thing is visible or not visible. It can be used to change the Visibility of the Thing containing the Action, or to change the Visibility of another Thing in the current Scene.

  When Things are added to a Scene they are visible, but you can change this by using the Hide/Show Action during playback, or even before the Scene starts playing. To change the Visibility of a Thing while in Edit Mode, use Hide Thing in the Edit menu.

  Invisible or hidden Things do not react when the cursor is over them or when clicked, and are not recognized by other actions such as Collision.

  Make this Thing
  Is the Thing that is manipulated by this action. Click on the Icon to get a pop-up list of the Things in the Scene, or type the name of the Thing in the field above the Thing Icon.

  If you enter the name of the Thing, and there are two Things on the Scene with that name, the Thing that will be chosen is the first one in the pop-up list.

  Hidden
  Makes the selected Thing invisible.

  Visible
  Shows the selected Thing.

  Reset to the original setting at end of mouse event
  When the Swap Action is no longer in effect, the change in visibility can revert to the original visibility. If this setting is not chosen, the visibility change will remain.

  Wait for end of Animation
  If this parameter is set, the Action won't be triggered until the Animation has played the number of times set. See also "Play to end of Sequence" in Chapter 7.

  Location
  Location moves the selected Thing to a new position on the screen. The position can be based on the current location of the Thing, the location of another Thing, or a random location. With this feature, you can move the Thing that the action is attached to, or any other Thing on the Scene. This action can only be applied to the MouseOver and the MouseClick States of a Thing.

  Move this Thing
  Idenitifies the Thing that is manipulated by this action. Click on the Icon to get a pop-up list of the Things on the Scene, or type the name of the Thing in the field above the Thing Icon.

  If you enter the name of the Thing, and there are two Things in the Scene with that name, the Thing that will be chosen is the first one in the pop-up list.

  A fixed distance
  Indicates the Thing to move to a specific location. The Location Action can move the Thing to a specific location (fixed distance) or a Random location in the scene.

  The location that the Thing is moved to is based on the current location of a Thing in the Scene. (It can also use the current location of the Thing that is being moved). This location can be adjusted by entering values into the top and left parameters.

  For example, to move an object 10 pixels to the left of its current location, you would enter 10 into left field and make the Thing both choices in the Settings sheet. To move to the right, enter -10 in the left field.

  From other Thing
  Is used as the basis for determining the Distance movement. The location of this Thing is used as the new location for the Move Thing, with adjustments based on the parameters you set for the Distance option.

  Random Location
  Moves the Thing to a random location. This disables the top, the left and "from other Thing" options which are used for the "A fixed distance" option.

  Reset to the original setting at end of mouse event.
  When the Location Action is no longer in effect, the change in location can revert to the original location. This means that the Thing will return to its original location. If this setting is not chosen, the change will remain.

  Wait for end of Animation
  If this parameter is set, the Action won't be triggered until the Animation has played the number of times you set. See also "Play to end of Sequence" in Chapter 7.

  Collision Action
  While ThingMaker offers a range of diverse Actions to attach to your Things, the most interesting and powerful Action is the Collision Action. It is a super-set of all the other Actions in ThingMaker. It can be added to any State of a Thing and may be set in motion when the Thing collides with any other Thing. Unlike other Actions, the Collision Action isn't actually triggered or not when the Thing changes States. Instead, it can only be triggered within a State; that is, the Thing must collide with another Thing in that State to actually trigger the Collision. For example, if you add a Collision Action to the MouseClick state, then you must have the mouse down on the Thing, and it must collide with another Thing, to trigger that Action.

  Once you have added the Collision Action, and you have chosen whether the collision is triggered when the Thing collides with any other Thing or with a specific Thing, you can specify the Action that will occur. Your choices are: Hide/Show, Location, Message Text, Status Text, Layer, Mail Address, Swap Things, or Web Address. The parameters for these Actions are available in the Action Tab of the Collision Settings Sheet ( See discussion below). You can add multiple Collision Actions to the same State of a Thing.

  This Thing or Any Thing?
  If you only have two Things in a Scene, it also doesn't matter whether you use the This Thing or the Any Thing option. It does matter, though, when you have Things that you don't want to trigger the Collision Action, such as a background Thing.

  On collision with
  Specifies what other Thing in the scene the Thing containing this Action must collide with to trigger the chosen Action.

- This Thing
  This lets you choose a Thing in the Scene from a pop-up list.
- Any Thing
  This causes the Collision Action to occur when the Thing collides with any other Thing in the Scene.

  Perform this action
  Chooses the type of Action that the Collision will trigger. You can choose only one type of Action for a Collision. The parameters of the Action you select are specified in a Settings Sheet that is accessed by clicking the Action Tab at the bottom of the Sheet.

  Collision Action Tab Settings Sheets
  These parameters mirror those found in the individual Action Settings Sheets. You'll want to check those Actions for a description of their individual parameters.

  <--Previous | table of contents | Next -->