SetTexture()

Syntax:

SetTexture( Gloss, Invert, Animated, Image Path, Tile )

Parameters:

Gloss – the name of one of the gloss styles you can create with this function. Gloss must be one of the following keywords: Paper, Card, Silk, Plastic, Metal or Glass. Alternatively you can enter an integer between 0 and 20. This parameter is optional and the default is Plastic. The keyword must be surrounded by quote marks or a variable containing one of the valid keywords.

Invert – set if the texture effect should be inverted or not. Invert is either true if you want to invert the texture or false if not. This parameter is optional and the default value is false.

Animated – set if the Image used is animated or not. Animated is either true if the image used is animated (e.g. an animated gif) and false if not. This parameter is optional and the default value is false.

Image Path – The filename of the image. Image Path should be the full pathname of the image file or the alias name given to the image in the Additional Resources tab of the page or Publication Properties dialog. This parameter is optional.

Note:
Pathnames normally contain backslashes e.g. D:\IntroGraph.bmp, all single backslashes should be entered as double backslashes i.e. D:\\IntroGraph.bmp.

Tile – set if the image used in Image Path should be tiled across the surface of the object or not. Tile is either true if the image should be tiled (i.e. repeated across the surface of the object until the object is filled) or false if the image is used once and stretched over the surface of the object. This parameter is optional and the default value is false.

Remarks:

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

(i)  Specify an object name – in this method, the Texture 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 Texture effect is set for the Object State of the object specified in the GetAppearance function.

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

image\Script_Button.jpgExamples