org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7A68BE34-5C07-4008-A886-A20D92669E05.html
changeset 229 716254ccbcc0
equal deleted inserted replaced
228:913c9751c067 229:716254ccbcc0
       
     1 
       
     2 <!DOCTYPE html
       
     3   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     4 <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="lightoff()"/><meta name="DC.Relation" scheme="URI" content="GUID-63189AAF-B987-450D-B605-A75921D2E61D"/><meta name="DC.Relation" scheme="URI" content="GUID-D66AB112-1BC4-4A88-AFCF-1CDBB94366B7"/><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-7A68BE34-5C07-4008-A886-A20D92669E05"/><title>lightoff() </title><script type="text/javascript">
       
     5       function initPage() {}
       
     6     </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-7A68BE34-5C07-4008-A886-A20D92669E05">lightoff()</h1><div>
       
     7 <p><strong>Syntax:</strong></p>
       
     8 <pre class="codeblock" id="GUID-807F2D3F-CB66-413E-8F06-FA13963FEB54">[void] sysinfo.lightoff(String lighttarget, Int duration, Int fadeout)</pre>
       
     9 <p><strong>Description:</strong></p>
       
    10 <p>The <code>lightoff</code> method switches the specified target light off for the specified duration.</p>
       
    11 <p><strong>Argument:</strong></p>
       
    12 <ul>
       
    13 <li><p><code>lighttarget</code>:</p>
       
    14 
       
    15 <p>Defines which target light should be turned off. Use one of the supported target light properties to specify a target light.</p>
       
    16 
       
    17 </li>
       
    18 <li><p><code>duration</code>:</p>
       
    19 
       
    20 <p>Defines the period during which the target light is switched off. The period is measured in milliseconds.</p>
       
    21 <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>
       
    22 <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 turned on only when some other light control method is called.</p>
       
    23 
       
    24 </li>
       
    25 <li><p><code>fadeout</code>:</p>
       
    26 
       
    27 <p>If <code>true</code>, target lights will not turn off instantly but fade-out smoothly instead. If <code>false</code>, target lights will be turned off immediately.</p>
       
    28 
       
    29 </li>
       
    30 </ul>
       
    31 <div class="note"><p><strong class="note_title">Note: </strong>All devices might not support fade-out, in which case the device will behave in its default manner.</p>
       
    32 </div>
       
    33 <p><strong>Return value:</strong></p>
       
    34 <p>This method does not return a value.</p>
       
    35 <p><strong>Example code:</strong></p>
       
    36 <pre class="codeblock" id="GUID-5F266902-60F8-432B-8FFB-EDEB7E09FC98">function callLightOff()
       
    37 {
       
    38    // get the Embed element reference
       
    39    var sysinfo = document.embeds[0];
       
    40    /*********************
       
    41    call lightoff() method, which turns off the light 
       
    42    of all displays and keyboard for 5 seconds of duration 
       
    43    and using fading out mode
       
    44    *********************/
       
    45    var target =  sysinfo.lighttargetsystem;
       
    46    var duration = 5000; // 5 seconds
       
    47    sysinfo.lightoff(target, duration, true);
       
    48 }
       
    49 </pre>
       
    50 </div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>