Shape Plugin

Description

This Shape plugin object is used to create one of three basic shapes on the page. You can create ellipses, rectangles and rounded rectangles. Several properties of the shape can be set using design-time properties and runtime actions. The shape can also respond to basic mouse events.

Properties

Shape Type

The type of shape that you want to display. Choose from ellipse, rectangle and rounded rectangle.

Corner Width

If you have Shape Type set to rounded rectangle, this is the width of the rounded corners in pixels.

Corner Height

If you have Shape Type set to rounded rectangle, this is the height of the rounded corners in pixels.

Stroke Mode

The style of the border that you want to use for the shape. Choose "Solid" if you want to use a color for the border. Choose "Transparent" if you want the border to be transparent (invisible).

Stroke Width

The width of the border in pixels. The higher this number, the larger the shape's border will appear. The minimum size is 1.

Stroke Color

The color of the border if Stroke Mode was set to "Solid". This is an RGB value.

Fill Mode

The fill mode for the fill or inside of the shape. Choose "Solid" if you want to use a color for the fill. Choose "Transparent" if you want the fill to be transparent (invisible). If transparent, you will be able to see through the object.

Fill Color

The color of the fill if Fill Mode was set to "Solid". This is an RGB value.

Events

On Click

Fires when the mouse clicks on the shape.

On Enter

Fires when the mouse enters the shape.

On Leave

Fires when the mouse leaves the shape.

Actions

Shape.SetFillColor (string ObjectName, number Color);

Description:

Changes the fill color of the shape.

ObjectName:

(string) The name of the shape object that you want to apply this action to.

Color:

(number) The RGB value to set the object's fill color to.

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Set the fill color to blue
Shape.SetFillColor("MyShape", 16711680);

Shape.SetFillMode (string ObjectName, number Mode);

Description:

Changes the fill mode of the shape.

ObjectName:

(string) The name of the shape object that you want to apply this action to.

Mode:

(number) The fill mode:

0: Solid
1: Transparent

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Set the fill mode to transparent
Shape.SetFillMode("MyShape",1);

Shape.SetStrokeColor (string ObjectName, number Color);

Description:

Changes the border color of the shape.

ObjectName:

(string) The name of the shape object that you want to apply this action to.

Color:

(number) The RGB value to set the object's border color to.

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Set the stroke color to red
Shape.SetStrokeColor("MyShape",255);

Shape.SetStrokeMode (string ObjectName, number Mode);

Description:

Changes the border mode of the shape.

ObjectName:

(string) The name of the shape object that you want to apply this action to.

Mode:

(number) The border mode:

0: Solid
1: Transparent

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Set the stroke mode to solid
Shape.SetStrokeMode("MyShape", 0);

Shape.SetStrokeWidth (string ObjectName, number Width);

Description:

Changes the border width of the shape.

ObjectName:

(string) The name of the shape object that you want to apply this action to.

Width:

(number) The border width, in pixels. (minimum = 1, maximum = 10)

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Set the stroke width to 5
Shape.SetStrokeWidth("MyShape", 5);

Shape.SetType (string ObjectName, number Type);

Description:

The type of shape to draw.

ObjectName:

(string) The name of the shape object that you want to apply this action to.

Type:

(number) The type of shape that you want the object to be:

0: Ellipse
1: Rectangle
2: Rounded Rectangle

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Make the object into a rounded rectangle
Shape.SetType("MyShape", 2);

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.

Additional Information

Author:

Indigo Rose Corporation
support@indigorose.com

Copyright:

The Shape plugin is copyright © 2003-2005 Indigo Rose Software Design Corporation.

Website:

http://www.indigorose.com


Copyright © 2005 Indigo Rose Software Design Corporation.
All Rights Reserved.