diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-63189AAF-B987-450D-B605-A75921D2E61D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-63189AAF-B987-450D-B605-A75921D2E61D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,80 @@ + + +lightblink()

lightblink()

+

Syntax:

+
[void] sysinfo.lightblink(String lighttarget, Int duration, Int onduration, Int offduration, Int intensity)
+

Description:

+

The lightblink method switches the specified target light on and off (blinking) for the specified duration with the brightness defined by a specified light intensity.

+

Argument:

+
    +
  • lighttarget:

    + +

    Defines which target light should be blinking. Use one of the supported target light properties to specify a target light.

    + +
  • +
  • duration:

    + +

    Defines the period during which the target light is set to blink. The period is measured in milliseconds.

    +

    After the duration expires, the light state of the target will be changed to whatever state was caused by the last infinite time duration call. If there has not been a previous infinite time duration call in a session, the default state determined by the inactivity timer (system backlight timeout) is used.

    +

    If duration is lightinfiniteduration, the target light can be stopped blinking only when some other light control method is called.

    +

    Duration can have the maximum value of lightmaxduration.

    + +
  • +
  • onduration:

    + +

    Defines the period during which the target light is switched on in every blinking cycle. The period is measured in milliseconds.

    +

    onduration argument can have the maximum value of lightmaxduration.

    +

    onduration argument can be the device default cycle duration lightdefaultcycletime. However, if either onduration or offduration is lightdefaultcycletime, both arguments must be lightdefaultcycletime.

    + +
  • +
+

Note: Some devices might not support variable blinking cycle times, in which case the default value will be substituted.

+
+
    +
  • offduration:

    + +

    Defines the period during which the target light is switched off in every blinking cycle. The period is measured in milliseconds.

    +

    offduration argument can have the maximum value of lightmaxduration

    +

    offduration argument can be the device default cycle duration lightdefaultcycletime. However, if either onduration or offduration is lightdefaultcycletime, both must be lightdefaultcycletime.

    + +
  • +
+

Note: Some devices might not support variable blinking cycle times, in which case the default value will be substituted.

+
+
    +
  • intensity:

    + +

    Defines the intensity (brightness) of the target light when it is switched on.

    +

    Use the lightminintensity and the lightmaxintensity to detect the range of supported light intensity, and use any value between the range to avoid providing an invalid intensity value.

    +

    intensity argument can have the device default value lightdefaultintensity.

    + +
  • +
+

Note: All devices might not support a user-defined intensity, in which case the device will behave in its default manner.

+
+

Return value:

+

This method does not return a value.

+

Remarks:

+

Switching the mobile device lights on consumes energy. Therefore, it is recommended that you carefully consider the need for using the lights.

+

Example code:

+
function callLightBlink()
+{
+   // get the Embed element reference
+   var sysinfo = document.embeds[0];
+   /*********************
+   call lightblink() method, which turns on and off the light 
+   of all displays and keyboard with a defined duration 
+   and using the default blinking cycle time with the device 
+   default light intensity
+   *********************/
+   var target =  sysinfo.lighttargetsystem;
+   var duration = 5000; // 5 seconds
+   var onDur = sysinfo. lightdefaultcycletime;
+   var offDur = sysinfo. lightdefaultcycletime;
+   var intensity = sysinfo.lightdefaultintensity;
+   sysinfo.lightblink(target, duration, onDur, offDur, intensity);
+}
+
\ No newline at end of file