Lordklloyd
Posts: 1
Nickname: lordklloyd
Registered: Apr, 2003
scroller doesn't funktion
Posted: Apr 3, 2003 11:09 PM
Advertisement
Hallo I have a Problem. This scrollerscript function with IE but it doesn't do this in Netscape.There is always a function "verifyCompatibleBrowser()", to do this in Netscape too. Can anyone help me? The script: <style type="text/css"> #divUpControl{position:absolute; width:650; left:10; top:10; z-index:1; text-align: center} #divDownControl{position:absolute; width:650; left:10; top:400; z-index:1; text-align: center} #divContainer{position:absolute; width:650; height:400; overflow:hidden; top:30; left:110; clip:rect(0,650,400,0); visibility:hidden} #divContent{position:absolute; top:0; left:0} </style> <script language="JavaScript"> function verifyCompatibleBrowser(){ this.ver=navigator.appVersion this.dom=document.getElementById?1:0 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; this.ie4=(document.all && !this.dom)?1:0; this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) return this } bw=new verifyCompatibleBrowser() var speed=20 var loop, timer function ConstructObject(obj,nest){ nest=(!nest) ? '':'document.'+nest+'.' this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?ev al(nest+'document.'+obj):0; this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].st yle:bw.ns4?eval(nest+'document.'+obj):0; this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight this.up=MoveAreaUp;this.down=MoveAreaDown; this.MoveArea=MoveArea; this.x; this.y; this.obj = obj + "Object" eval(this.obj + "=this") return this } function MoveArea(x,y){ this.x=x;this.y=y this.css.left=this.x this.css.top=this.y } function MoveAreaDown(move){ if(this.y>-this.scrollHeight+objContainer.clipHeight){ this.MoveArea(0,this.y-move) if(loop) setTimeout(this.obj+".down("+move+")",speed) } } function MoveAreaUp(move){ if(this.y<0){ this.MoveArea(0,this.y-move) if(loop) setTimeout(this.obj+".up("+move+")",speed) } } function PerformScroll(speed){ if(initialised){ loop=true; if(speed>0) objScroller.down(speed) else objScroller.up(speed) } } function CeaseScroll(){ loop=false if(timer) clearTimeout(timer) } var initialised; function InitialiseScrollableArea(){ objContainer=new ConstructObject('divContainer') objScroller=new ConstructObject('divContent','divContainer') objScroller.MoveArea(0,0) objContainer.css.visibility='visible' initialised=true; } // end absolutely positioned scrollable area object scripts </script> </HEAD> <BODY text=#000000 vLink=#2a3953 aLink=#2a3953 link=#2a3953 bgColor=#ffffff onLoad="InitialiseScrollableArea();"> <!-- begin absolutely positioned scrollable area object--> <div id="divUpControl"> <a href="javascript:;" onMouseOver="PerformScroll(-7)" onMouseOut="CeaseScroll()"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0" width="400" height="18" vspace="0" hspace="0"> <param name="movie" value="Pfeil3.swf"> <param name="play" value="true"> <param name="loop" value="true"> <param name="quality" value="high"> <embed src="Pfeil3.swf" play="true" loop="true" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Ver sion=ShockwaveFlash" width="400" height="18"></embed> </object></a></div> <div id="divDownControl"> <a href="javascript:;" onMouseOver="PerformScroll(7)" onMouseOut="CeaseScroll()"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0" width="400" height="18" vspace="0" hspace="0"> <param name="movie" value="Pfeil2.swf"> <param name="play" value="true"> <param name="loop" value="true"> <param name="quality" value="high"> <embed src="Pfeil2.swf" play="true" loop="true" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Ver sion=ShockwaveFlash" width="400" height="18"></embed> </object></a> </div> <div id="divContainer"> <div id="divContent"> gdasafdffffffffffffffffffffffffffffffffffffffffasdasdasd<br> d<br> d<br> d<br> d<br> d<br> d<br> d<br> d<br > <br> d<br> d<br> d<br> d<br> d<br> d< ;br> d<br> d<br> d<br> d<br> d<br> d<br> d<br> d<br> d<br> d<br> d<br> d<br> d<br& gt; </div> </div> <!-- end absolutely positioned scrollable area object --> </BODY></HTML>