addAmbient Method

DHTML, HTML, & CSS

addAmbient Method


Adds an ambient light to the light filter effect object.

Syntax

object.filters.light.addAmbient(iRed, iGreen, iBlue, iStrength)

Parameters

iRedRequired. Integer that specifies the red value, ranging from 0 (lowest saturation) to 255 (highest saturation).
iGreenRequired. Integer that specifies the green value, ranging from 0 (lowest saturation) to 255 (highest saturation).
iBlueRequired. Integer that specifies the blue value, ranging from 0 (lowest saturation) to 255 (highest saturation).
iStrengthRequired. Integer that specifies the intensity of the light filter, with values ranging from 0 (lowest intensity) to 100 (highest intensity). The intensity specified pertains to the target coordinates.

Return Value

No return value.

Remarks

Ambient light is nondirectional and sheds parallel beams perpendicular to the surface of the page. Ambient light has color and strength values that add more color to the object; it is often used with other lights.

This example uses the addAmbient method to create a blue ambient light with a low intensity.

<STYLE>
   .aFilter {background-color: #FFFFFF; filter: light();
             color: #000000;
             width: 150;}
</STYLE>
<SCRIPT>
function init()
{
   :
   oDiv.filters.light.addAmbient(0,0,255,10);
   :
}   
</SCRIPT>   
<DIV CLASS="aFilter" ID="oDiv" onload="init()">
  This text is applied with a low-intensity light filter.
</DIV>

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
light

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.