Compartir a través de


EFFECTS.currentEffect

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The currentEffect attribute specifies or retrieves the current visualization.

        elementID.currentEffect

Possible Values

This attribute is a read/write object. The default value is the first visualization in the authoring order. If there are no visualizations authored in the skin, the default is the first visualization in the registry.

Remarks

You can use this object to access custom visualizations you have created. For example, you could expose a property through the IDispatch interface in your visualization. You can then change the property value from your skin by making your visualization the current effect, and then using the currentEffect object to set a new value for the property. For example, if your visualization exposes a property named backgroundColor, the following JScript code specifies a new value:

// The EFFECTS element ID is MyEffects.
MyEffects.currentEffect.backgroundColor = "blue";

Requirements

Requirement Value
Version
Windows Media Player version 7.0 or later

See also

EFFECTS Element

EFFECTS.currentEffectTitle

EFFECTS.currentEffectType