Share via


Windows Media Player 11 SDK CUSTOMSLIDER.positionImage 

Windows Media Player SDK banner art

Previous Next

CUSTOMSLIDER.positionImage

The positionImage attribute specifies or retrieves the image map used to determine which position image from the image file to display.

Syntax

  

Possible Values

This attribute is a read/write String containing the name of an image file.

Remarks

This attribute is required and must be specified.

The positionImage is not displayed. Instead, it serves as a map defining the clickable regions of the displayed image. The displayed image is one of the sub-images of the image file and represents the actual state of the slider. The positionImage includes a number of gray scale regions equal to the number of these sub-images. The sub-images must have the same dimensions as the positionImage or the custom slider will not work correctly.

Any region that is not in gray scale will not be clickable. The clickable regions should be set to color values that range evenly across the gray scale spectrum from black to white, with the first region being pure black and the last region being pure white. The color values of each successive region should be incremented by a value equal to 255 divided by the total number of regions minus one, rounding to the nearest whole number.

For example, if there are six regions, the increment would be 51 (255 divided by 5), and the six gray scale values would be 0, 51, 102, 153, 204, and 255. The hexadecimal color values for the six regions would then be #000000, #333333, #666666, #999999, #CCCCCC, and #FFFFFF.

In this way, the regions will have a sequence dictated by their gray scale color values, and this sequence will correspond to the sequence of sub-images in the image file. When one of the regions is clicked, the corresponding sub-image is shown and the value of the custom slider is updated accordingly.

The supported image file types are BMP, JPG, PNG, and GIF (not including animated GIFs).

Example

The following is an example of a custom slider positionImage. The corresponding image is shown in the example section of the image property.

sample positionImage graphic

The following code illustrates the use of CUSTOMSLIDER attributes.

  

Requirements

Windows Media Player version 7.0 or later.

See Also

Previous Next