Control

What Is It?

A control player is a type of sprite that the user can move along a path or curve or inside a designated area. In response to the user's mouse drag, the control player moves, continuously changing value. The value of a control can affect a property of another player or be posted to the server.

Along a path, the control player's value is an integer; the set of possible values is a range, starting with a minimum at one side and increasing to a maximum at the other side. Within an area, the control player's value is a set of X,Y coordinates.

A control player is visible, playable, and postable.

Why Use It?

To let the user specify a numeric value and optionally, to affect the running mbedlet.

How to Create It

To create a control player, go to the Players toolbar and click on Control. A new control player appears in the Players window, already selected. You will now:

  1. Select the control images
  2. Set the control properties

Selecting Control Images

A control is a type of sprite and has images as its data. Attach images in the same way that you choose sprite images.

Setting Control Properties

To set the properties for the control player, select the control and right-click, then choose Properties...

Under the Control tab, set the properties as follows:

Property Purpose
TYPE Creates a 2D or slider control player.

A 2D control player is a rectangular area whose dimensions are set as X,Y coordinates. A slider is a one dimensional path whose end points are integers.

Under the Curve tab, the STARTPOINT and ENDPOINT values specify the dimensions of a 2D  player or the endpoints of a slider.

MIN Indicates the start value of the control. The value is a set of coordinates for a 2D player or an integer for a slider.
MAX Indicates the end value of the control. The value is a set of coordinates for a 2D player or an integer for a slider.
VALUE Specifies the current value of the control, at or between the MIN and MAX values. As the value of the control changes, it can change properties of another player.
PLAYER Associates the control player with another player. A property of the the other player changes as the control's value changes. For example, as the control's value moves from 100 to 200, a sprite's FLIPINTERVAL property can change from 100 to 200.
PROPERTY Associates the control player's value with another player's property. For example, a picture's BLEND property could change from 50 to 100 as the control's value moves from 50 to 100.
CONTINUOUS Changes the value as the mouse moves. By default, the player's property changes when the user releases the mouse.
STEPSIZE Allows only a certain set of values. For instance a STEPSIZE value of 5 restricts the values to those divisible by 5.
AUTOHIDE Hides the control player if the value for MIN and MAX are the same.

For example, when a text player reloads, it might set the MAX value of a scrollbar to the maximum allowed scroll. If the loaded text fits completely on the screen, the MAX value is 0 and the scrollbar hides.

SNAPTOVALUE Snaps the control to the step values, rather than having it glide smoothly.

Under the Curve tab, set the properties as follows:

CURVETYPE Controls the style of path: straight, circular, or Bezier.
STARTPOINT
ENDPOINT
Specifies the values at each end of the control. The values for these properties are a set of X,Y coordinates.
STARTSIZE
ENDSIZE
Changes the control's size from the value of STARTSIZE to the value of ENDSIZE. To use these properties, you must also set SCALETOFIT under the Sprite tab.
CONTROLPOINT1
CONTROLPOINT2
For Bezier only, controls the shape of the curve.
CLOCKWISE For circular only, moves the player clockwise on the path. You control the size of the curve's radius with the RADIUS property.
CONCAVE For circular only, enables an arc greater than 180 degrees.
RADIUS For circular only, controls the size of the curve's radius.

Many of these operations are much more easily accomplished in the Layout window.

Under the Postable tab:

Because a control is also a sprite, you can set Sprite properties. If you include multiple images for the control's data, it flips between them either along the path or over time.

Playable and draggable properties are not generally relevant for a control. However, control players have visible properties.



Skeleton animated gif courtesy of In2 Inc.

Previous Page Next Page