Runs fine here, after I fixed the directory pathing. I'm "assuming" from
this point on that your creating this inside the examples folder and that
you haven't changed the directory structure. The following changes fixed
your example.
<script language="Javascript" src="../src/dynapi.js"></script>
<script language="Javascript">
DynAPI.setLibraryPath('../src/lib/')
DynAPI.include('dynapi.api.*')
Nothing wrong with the layer, listener structure. Your library pathing has
an error in it somewhere.
DS
----- Original Message -----
From: "Arnold Meenhorst" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 25, 2000 5:27 AM
Subject: [Dynapi-Help] mouseover and mouseout events not working?
> Hello,
>
> I tried the mouseover and mouseout event example. I'm using the latest
> dynapi sources. I've just downloaded them from the CVS.
> The following example wont run in NS4.51 NS6 and IE5.5
> Why?
>
> <html>
> <head><title>DynAPI2 tutor - mouseevents listener</title>
> <SCRIPT language="Javascript" src="./dynAPI/js/dynapi.js"></SCRIPT>
> <SCRIPT language="Javascript">DynAPI.setLibraryPath('./dynAPI/js/lib')
>
> DynAPI.include('dynapi.api.*')
>
> DynAPI.onLoad=function() {
> myLayer=new DynLayer(null,100,100,100,100,'#c0c0c0')
>
> myListener=new EventListener(myLayer)
> myListener.onmouseover=function(e) {
> target=e.getTarget()
> target.setBgColor('#0000f0')
> }
> myListener.onmouseout=function(e) {
> target=e.getTarget()
> target.setBgColor('#c0c0c0')
> }
>
> myLayer.addEventListener(myListener)
>
> DynAPI.document.addChild(myLayer)
> }
>
> </script>
> </head>
> <body>
> </body>
> </html>
>
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/mailman/listinfo/dynapi-help
>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-help