home *** CD-ROM | disk | FTP | other *** search
/ Hentai 69 / HENTAI69.iso / Extra / MPSetup.exe / 1033 / RCDATA / CABINET / wmploc.DLL / HTML / FLYOUT.HTC < prev    next >
Text File  |  2002-12-14  |  2KB  |  91 lines

  1. <PUBLIC:COMPONENT lightWeight=true>
  2.  
  3. <PUBLIC:EVENT name="onflydone" ID=done />
  4.  
  5. <PUBLIC:PROPERTY NAME="speed" />
  6. <PUBLIC:PROPERTY NAME="source" />
  7. <PUBLIC:PROPERTY NAME="endPoint" />
  8.  
  9. <PUBLIC:METHOD NAME="flyout" />
  10.  
  11. <SCRIPT LANGUAGE="JScript">
  12. var iEnd, iSpeed, iCount = 0;
  13. function doflyout()
  14. {
  15.     var iAdjust, ssty = source.style;
  16.     if (ssty.posLeft != iEnd)
  17.     {
  18.         iAdjust = iSpeed;
  19.  
  20.         if (IsRTLPage())
  21.         {
  22.             if ((iEnd - ssty.posLeft) < iSpeed) 
  23.             {
  24.                 iAdjust = (iEnd - ssty.posLeft) / 4;
  25.                 if (iAdjust < 4) iAdjust = iEnd - ssty.posLeft;
  26.             }
  27.             ssty.posLeft += iAdjust;
  28.         }
  29.         else
  30.         {
  31.             if ((ssty.posLeft - iEnd) < iSpeed) 
  32.             {
  33.                 iAdjust = (ssty.posLeft - iEnd) / 4;
  34.                 if (iAdjust < 4) iAdjust = ssty.posLeft - iEnd;
  35.             }
  36.             ssty.posLeft -= iAdjust;
  37.         }
  38.         window.setTimeout(doflyout, 1);
  39.     }
  40.     else
  41.     {
  42.         var e = createEventObject();
  43.         e.direction = 1;
  44.         e.page = source;
  45.         done.fire(e); 
  46.     }
  47. }
  48.  
  49. function flyaway()
  50. {
  51.     var ssty = source.style, fDone = false;
  52.  
  53.     if (IsRTLPage())
  54.     {
  55.         if (ssty.posLeft > iEnd)
  56.             ssty.posLeft -= iSpeed;
  57.         else
  58.             fDone = true;
  59.     }
  60.     else
  61.     {
  62.         if (ssty.posLeft < iEnd)
  63.             ssty.posLeft += iSpeed;
  64.         else
  65.             fDone = true;
  66.     }
  67.         
  68.     if (!fDone)
  69.         window.setTimeout(flyaway, 1);
  70.     else
  71.     {
  72.         var e = createEventObject();
  73.         e.direction = 0;
  74.         e.page = source;
  75.         done.fire(e); 
  76.     }
  77. }
  78.  
  79. function flyout(iDir)
  80. {
  81.     iEnd = parseInt(endPoint);
  82.     iSpeed = parseInt(speed);
  83.     if (iDir == 1)
  84.         doflyout();
  85.     else
  86.         flyaway();
  87. }
  88.  
  89. </SCRIPT>
  90. </PUBLIC:COMPONENT>
  91.