home *** CD-ROM | disk | FTP | other *** search
- <PUBLIC:COMPONENT lightWeight=true>
-
- <PUBLIC:EVENT name="onflydone" ID=done />
-
- <PUBLIC:PROPERTY NAME="speed" />
- <PUBLIC:PROPERTY NAME="source" />
- <PUBLIC:PROPERTY NAME="endPoint" />
-
- <PUBLIC:METHOD NAME="flyout" />
-
- <SCRIPT LANGUAGE="JScript">
- var iEnd, iSpeed, iCount = 0;
- function doflyout()
- {
- var iAdjust, ssty = source.style;
- if (ssty.posLeft != iEnd)
- {
- if ((ssty.posLeft - iEnd) < iSpeed)
- {
- iAdjust = (ssty.posLeft - iEnd) / 4;
- if (iAdjust < 4) iAdjust = ssty.posLeft - iEnd
- }
- else
- iAdjust = iSpeed;
-
- ssty.posLeft -= iAdjust;
- window.setTimeout(doflyout, 1);
- }
- else
- {
- var e = createEventObject();
- e.direction = 1;
- e.page = source;
- done.fire(e);
- }
- }
-
- function flyaway()
- {
- var ssty = source.style;
- if (ssty.posLeft < iEnd)
- {
- ssty.posLeft += iSpeed;
- window.setTimeout(flyaway, 1);
- }
- else
- {
- var e = createEventObject();
- e.direction = 0;
- e.page = source;
- done.fire(e);
- }
- }
-
- function flyout(iDir)
- {
- iEnd = parseInt(endPoint);
- iSpeed = parseInt(speed);
- if (iDir == 1)
- doflyout();
- else
- flyaway();
- }
-
- </SCRIPT>
- </PUBLIC:COMPONENT>
-