From: Bill Z. <bil...@ho...> - 2001-10-17 19:10:40
|
<html><div style='background-color:'><DIV> <DIV> <DIV>Hello all I am trying to create a layer that slides when the user mouses over some text. This is what I have come up with so far and it works onclick but not on mouseover. </DIV> <DIV> </DIV> <DIV>Help! Please</DIV> <DIV> </DIV> <DIV><script language="Javascript" src="../src/dynapi.js"></script><BR><script language="Javascript"><BR>DynAPI.setLibraryPath('../src/lib/');<BR>DynAPI.include('dynapi.event.*');<BR>DynAPI.include('dynapi.api.*');<BR>DynAPI.include('dynapi.event.*')<BR>DynAPI.include('dynapi.util.thread.js');<BR>DynAPI.include('dynapi.util.pathanim.js');<BR></script><BR><script language="Javascript"></DIV> <DIV>DynAPI.onLoad=function() { </DIV> <DIV> myLayer = new DynLayer(null, 100, 100, 100, 100, '#cc0000')<BR> <BR> var listener = new EventListener(myLayer)<BR> var listener2 = new EventListener(myLayer)<BR> <BR> listener.onmouseover = function (e) {<BR> listener2.onpathstart = function(e) {<BR> status = "start";<BR> }<BR> }<BR> listener.onmouseout = function (e) { <BR> listener2.onpathrun = function(e) {<BR> var o = e.getSource();<BR> status = "play "+o.x+" "+o.y;<BR> } <BR> }<BR> myLayer.addEventListener(listener2);<BR> myLayer.addEventListener(listener);<BR> <BR> </DIV> <DIV> DynAPI.document.addChild(myLayer)<BR>}</DIV> <DIV></script> </DIV> <DIV> </DIV> <DIV> </DIV> <DIV><br>(<a href="javascript:myLayer.slideTo(100,100)">100,100</a>)<BR><br>(<a href="javascript:myLayer.slideTo(200,100)">200,100</a>)</DIV></DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_itl_EN.asp'>http://explorer.msn.com</a><br></html> |