home *** CD-ROM | disk | FTP | other *** search
- <html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <title>Drag Floating Box Action</title> <meta name="generator" content="Adobe GoLive 5"> </head> <body bgcolor="white"> <center> <font size="6">Drag Floating Box Action</font> <hr> </center> <csactionclass name="Drag Floating Box" function="CSDrag" nsversion="4" ieversion="4"> <csactionparam name="layer" type="GLActionLayerParam"></csactionparam> </csactionclass> <p>IE Functions Script <script language="JavaScript1.2" src="../../GlobalScripts/IE.scpt" cyberversion="N1.2"></script> </p>
- <p>Drag Action Main Script <script language="JavaScript1.2" cyberversion="N1.2"><!--var gCSIEDragObject = null;function CSSetupDrag (layerName) { this.x = 0; this.y = 0; if (IsIE()) { this.canDrag=true; this.layerObj=document.all.tags("div")[layerName]; this.layerObj.dragObj = this; document.ondragstart = CSIEStartDrag; document.onmousedown = CSIEMouseDown; document.onmouseup = CSIEStopDrag; } else { this.layer=CSNSStyl(layerName);this.onmousemove=null; this.layer.document.theLayer=this; this.layer.document.captureEvents(Event.MOUSEDOWN); this.layer.document.onmousedown=CSNSStartDrag; this.layer.document.onmouseup=CSNSStopDrag; }}function CSNSStartDrag (ev) { var clickInMe = false; if (ev.target != this) { for (var i=0;i<this.images.length;i++) { if (this.images[i] == ev.target) { clickInMe = true; break;} } } else clickInMe = true; if (clickInMe) { this.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP); this.onmousemove=CSNSDoDrag; this.theLayer.x= ev.pageX; this.theLayer.y= ev.pageY; this.routeEvent(ev); return false; } this.onmousemove=null;this.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP); this.routeEvent(ev); return true;}function CSNSStopDrag (ev) { this.onmousemove=null;this.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);return false;}function CSNSDoDrag (ev) { this.theLayer.layer.moveBy(ev.pageX-this.theLayer.x, ev.pageY-this.theLayer.y); this.theLayer.x = ev.pageX; this.theLayer.y = ev.pageY; this.routeEvent(ev);}function CSIEStartDrag () { if(gCSIEDragObject != null && (gCSIEDragObject.tagName==event.srcElement.tagName)) event.returnValue=false;}function CSIEStopDrag () { gCSIEDragObject=null; document.onmousemove=null; }function CSIEMouseDown () { if(event.button==1) { dragLayer = event.srcElement; while (dragLayer!=null) { if ((dragLayer.dragObj == null) && (dragLayer.tagName == "DIV")) break; if (dragLayer.dragObj != null) break; dragLayer=dragLayer.parentElement; } if (dragLayer == null) return; if (dragLayer.dragObj!=null && dragLayer.dragObj.canDrag) { gCSIEDragObject = dragLayer; gCSIEDragObject.dragObj.x=event.clientX; gCSIEDragObject.dragObj.y=event.clientY; document.onmousemove = CSIEMouseMove; } }}function CSIEMouseMove () { gCSIEDragObject.dragObj.layerObj.style.pixelLeft+=(event.clientX-gCSIEDragObject.dragObj.x); gCSIEDragObject.dragObj.layerObj.style.pixelTop+=(event.clientY-gCSIEDragObject.dragObj.y); gCSIEDragObject.dragObj.x=event.clientX; gCSIEDragObject.dragObj.y=event.clientY; event.returnValue = false; event.cancelBubble = true;}var gDragArray = new Array();function CSDrag(action) { gDragArray[gDragArray.length] = new CSSetupDrag(action[1]); }// --> </script> </p>
- <table cool width="223" height="153" border="0" cellpadding="0" cellspacing="0" gridx="16" showgridx gridy="16" showgridy bgcolor="#eeeeee">
- <tr height="6">
- <td width="1" height="152" rowspan="3"><spacer type="block" width="1" height="152"></td>
- <td width="83" height="9" rowspan="2"><spacer type="block" width="83" height="9"></td>
- <td width="138" height="6"><spacer type="block" width="138" height="6"></td>
- <td width="1" height="6"><spacer type="block" width="1" height="6"></td>
- </tr>
- <tr height="3">
- <td width="138" height="146" rowspan="2" valign="top" align="left" xpos="84">
- <csactioncntrl name="layer" x="87" y="6" width="136" height="18" alignx="scale" aligny="top">
- </td>
- <td width="1" height="3"><spacer type="block" width="1" height="3"></td>
- </tr>
- <tr height="143">
- <td width="83" height="143" valign="top" align="left" xpos="1">
- <csactioncntrl type="InfoText" value="Schweberahmen:" x="1" y="9" width="82" height="15" alignx="left" aligny="top">
- </td>
- <td width="1" height="143"><spacer type="block" width="1" height="143"></td>
- </tr>
- <tr height="1" cntrlrow>
- <td width="1" height="1"><spacer type="block" width="1" height="1"></td>
- <td width="83" height="1"><spacer type="block" width="83" height="1"></td>
- <td width="138" height="1"><spacer type="block" width="138" height="1"></td>
- <td width="1" height="1"><spacer type="block" width="1" height="1"></td>
- </tr>
- </table>
- </body></html>