Name
SetLayerTransparency -- set transparency of a layer (V1.5)
Synopsis
SetLayerTransparency(id, level)
Function
This function can be used to set the transpareny level of a layer or layer group. The transparency level must be between 0 and 255, where 0 means no transparency (layer default setting) and 255 is full transparency which means that you will not see the layer any more (in that case it is of course more efficient to just hide the layer using HideLayer(). Please note that this is just the other way round from SetAlphaIntensity() where 255 means no transparency and 0 means full transparency.

Starting with Hollywood 2.0, level can also be a string containing a percent specification, e.g. "50%".

You need to enable layers before you can use this function. See Layers introduction for details.

Inputs
id
identifier of the layer or layer group to use
level
transparency level to apply (0 to 255 or percent specification)
Example
EnableLayers()

; do not display the text, just add the layer
SelectBGPic(1)
TextOut(#RIGHT, #BOTTOM, "Hello World")
EndSelect

; now it will be displayed!
SetLayerTransparency(1, 128)
The code above creates layer 1 (text "Hello World") and makes it appear with a transparency of 50% (= 128).

Show TOC