RemoveLayerFX -- remove a layer with transition effects (V3.0)
[handle] = RemoveLayerFX(id[, table])
This function is an extended version of the RemoveLayer() command. It removes the layer specified by id and uses one of the many Hollywood transition effects. You can also specify the speed for the transition and an optional argument.

Starting with Hollywood 4.0 this function uses a new syntax with just a single table as an optional argument. The old syntax is still supported for compatibility reasons. The optional table argument can be used to configure the transition effect. The following options are possible:

Specifies the desired effect for the transition. See DisplayTransitionFX for a list of supported transition effects. (defaults to #RANDOMEFFECT)

Specifies the desired speed for the transition. The higher the value you specify here, the faster the effect will be displayed. (defaults to #NORMALSPEED)

Some transition effects accept an additional parameter. This can be specified here. (defaults to #RANDOMPARAMETER)

You can use this field to create an asynchronous draw object for this transition. If you pass True here RemoveLayerFX() will exit immediately, returning a handle to an asynchronous draw object which you can then draw using AsyncDrawFrame(). See AsyncDrawFrame for more information on asynchronous draw objects.

If the layer to be removed has a border, do not gradually fade out the border but remove it in one go at the end of the transition effect. (V5.0)

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

identifier or name of the layer to remove
optional: table configuring the transition
optional: handle to an asynchronous draw object; will only be returned if Async has been set to True (see above)
RemoveLayerFX(5, #CROSSFADE)             ; old syntax


RemoveLayerFX(5, {Type = #CROSSFADE})    ; new syntax
The above code removes layer 5 with a nice crossfade transition.

Show TOC