SetShadow()

Syntax:

SetShadow( Height, Width, Transparency, Colour, Blur )

Parameters:

Height – the height in pixels of the shadow. Height must be a positive integer. This parameter is optional and the default is 10.

Width – the width in pixels of the shadow. Width must be a positive integer. This parameter is optional and the default is 10.

Transparency – a percentage, showing the level of transparency for the shadow. Transparency must be a positive integer between 0 and 100. This parameter is optional and the default is 75.

Colour – the colour of the shadow. Colour must be a positive integer indicating a valid RGB value or a variable containing a valid RGB value. This parameter is optional and the default is 0 (i.e. black).

Blur – the blur value in pixels for the shadow. Blur must be an integer between 0 and 5. This parameter is optional and the default is 2.

Note:
The RGB value can be calculated using the RGB function.

Remarks:

This function allows you to set the Shadow effect for a specified object. There are two methods of using this function:

(i)  Specify an object name – in this method, the Shadow effect will be set on the Normal (i.e. default) Object State.

(ii) Specify a new object created with the GetAppearance function – in this method, the Shadow effect is set for the Object State of the object specified in the GetAppearance function.

Note:
The Shadow effect can be removed using the RemoveShadow function or in the Effects tab of the object’s Properties dialog.

image\Script_Button.jpgExamples