org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-63189AAF-B987-450D-B605-A75921D2E61D.html
author Eugene Ostroukhov <eugeneo@symbian.org>
Mon, 07 Jun 2010 16:33:07 -0700
changeset 354 0bceeb415e7f
parent 229 716254ccbcc0
permissions -rw-r--r--
Bug 2892 - Import wgz file from Import menu should have same functionality as File New Project Create from wgz


<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="copyright" content="(C) Copyright 2009"/><meta name="DC.rights.owner" content="(C) Copyright 2009"/><meta name="DC.Type" content="mobileconcept"/><meta name="DC.Title" content="lightblink()"/><meta name="DC.Relation" scheme="URI" content="GUID-EF4E58FF-E9EA-429C-9D3D-5F0911B534CA"/><meta name="DC.Relation" scheme="URI" content="GUID-7A68BE34-5C07-4008-A886-A20D92669E05"/><meta name="DC.Relation" scheme="URI" content="GUID-7C69DDA4-16F1-4A8F-BDB2-4CB0015B4E81"/><meta name="DC.Relation" scheme="URI" content="GUID-65AAF569-D347-462B-B59A-9D7CA184AB9C"/><meta name="DC.Relation" scheme="URI" content="GUID-1A678A11-0BDD-4F64-9F40-013F6CDB81D7"/><meta name="DC.Relation" scheme="URI" content="GUID-318BD3F5-D351-4BC2-8F4F-6E096A56CD54"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-63189AAF-B987-450D-B605-A75921D2E61D"/><title>lightblink() </title><script type="text/javascript">
      function initPage() {}
    </script><link href="../PRODUCT_PLUGIN/book.css" rel="stylesheet" type="text/css"/><link href="css/s60/style.css" rel="stylesheet" type="text/css" media="all"/></head><body onload="initPage();"><div class="body"><div class="contentLeft prTxt"><h1 class="pageHeading" id="GUID-63189AAF-B987-450D-B605-A75921D2E61D">lightblink()</h1><div>
<p><strong>Syntax:</strong></p>
<pre class="codeblock" id="GUID-B73FA3EB-984A-47FA-8A37-2562FF0A5BA6">[void] sysinfo.lightblink(String lighttarget, Int duration, Int onduration, Int offduration, Int intensity)</pre>
<p><strong>Description:</strong></p>
<p>The <code>lightblink</code> method switches the specified target light on and off (blinking) for the specified duration with the brightness defined by a specified light intensity.</p>
<p><strong>Argument:</strong></p>
<ul>
<li><p><code>lighttarget</code>:</p>

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

</li>
<li><p><code>duration</code>:</p>

<p>Defines the period during which the target light is set to blink. The period is measured in milliseconds.</p>
<p>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.</p>
<p>If <code>duration</code> is <a href="GUID-A4CEF923-1DE8-46E0-8D42-79AA621A06A2.html#GUID-A4CEF923-1DE8-46E0-8D42-79AA621A06A2"><code>lightinfiniteduration</code></a>, the target light can be stopped blinking only when some other light control method is called.</p>
<p>Duration can have the maximum value of <a href="GUID-9B63C06E-3FCE-4201-B6C5-4F728894DA40.html#GUID-9B63C06E-3FCE-4201-B6C5-4F728894DA40"><code>lightmaxduration</code></a>.</p>

</li>
<li><p><code>onduration</code>:</p>

<p>Defines the period during which the target light is switched on in every blinking cycle. The period is measured in milliseconds. </p>
<p><code>onduration</code> argument can have the maximum value of <a href="GUID-9B63C06E-3FCE-4201-B6C5-4F728894DA40.html#GUID-9B63C06E-3FCE-4201-B6C5-4F728894DA40"><code>lightmaxduration</code></a>. </p>
<p><code>onduration</code> argument can be the device default cycle duration <a href="GUID-3ED63699-D71D-479A-A191-F7145271CCBC.html#GUID-3ED63699-D71D-479A-A191-F7145271CCBC"><code>lightdefaultcycletime</code></a>. However, if either <code>onduration</code> or <code>offduration</code> is <a href="GUID-3ED63699-D71D-479A-A191-F7145271CCBC.html#GUID-3ED63699-D71D-479A-A191-F7145271CCBC"><code>lightdefaultcycletime</code></a>, both arguments must be <a href="GUID-3ED63699-D71D-479A-A191-F7145271CCBC.html#GUID-3ED63699-D71D-479A-A191-F7145271CCBC"><code>lightdefaultcycletime</code></a>. </p>

</li>
</ul>
<div class="note"><p><strong class="note_title">Note: </strong>Some devices might not support variable blinking cycle times, in which case the default value will be substituted.</p>
</div>
<ul>
<li><p><code>offduration</code>:</p>

<p>Defines the period during which the target light is switched off in every blinking cycle. The period is measured in milliseconds.</p>
<p><code>offduration</code> argument can have the maximum value of <a href="GUID-9B63C06E-3FCE-4201-B6C5-4F728894DA40.html#GUID-9B63C06E-3FCE-4201-B6C5-4F728894DA40"><code>lightmaxduration</code></a></p>
<p><code>offduration</code> argument can be the device default cycle duration <a href="GUID-3ED63699-D71D-479A-A191-F7145271CCBC.html#GUID-3ED63699-D71D-479A-A191-F7145271CCBC"><code>lightdefaultcycletime</code></a>. However, if either <code>onduration</code> or <code>offduration</code> is <a href="GUID-3ED63699-D71D-479A-A191-F7145271CCBC.html#GUID-3ED63699-D71D-479A-A191-F7145271CCBC"><code>lightdefaultcycletime</code></a>, both must be <a href="GUID-3ED63699-D71D-479A-A191-F7145271CCBC.html#GUID-3ED63699-D71D-479A-A191-F7145271CCBC"><code>lightdefaultcycletime</code></a>. </p>

</li>
</ul>
<div class="note"><p><strong class="note_title">Note: </strong>Some devices might not support variable blinking cycle times, in which case the default value will be substituted.</p>
</div>
<ul>
<li><p><code>intensity</code>:</p>

<p>Defines the intensity (brightness) of the target light when it is switched on.</p>
<p>Use the <a href="GUID-EF4E58FF-E9EA-429C-9D3D-5F0911B534CA.html#GUID-EF4E58FF-E9EA-429C-9D3D-5F0911B534CA"><code>lightminintensity</code></a> and the <a href="GUID-9695EFDE-3134-4AA7-9422-613DEDEAE314.html#GUID-9695EFDE-3134-4AA7-9422-613DEDEAE314"><code>lightmaxintensity</code></a> to detect the range of supported light intensity, and use any value between the range to avoid providing an invalid intensity value.</p>
<p><code>intensity</code> argument can have the device default value <a href="GUID-F51B8923-8A46-49A0-B307-E84194904454.html#GUID-F51B8923-8A46-49A0-B307-E84194904454"><code>lightdefaultintensity</code></a>. </p>

</li>
</ul>
<div class="note"><p><strong class="note_title">Note: </strong>All devices might not support a user-defined intensity, in which case the device will behave in its default manner.</p>
</div>
<p><strong>Return value:</strong></p>
<p>This method does not return a value.</p>
<p><strong>Remarks:</strong></p>
<p>Switching the mobile device lights on consumes energy. Therefore, it is recommended that you carefully consider the need for using the lights.</p>
<p><strong>Example code:</strong></p>
<pre class="codeblock" id="GUID-514C6452-9E38-49A3-AFD0-73741213E1A2">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);
}</pre>
</div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>