Thanks a lot for your fast and effictive help. Strange mistake :-)
N ow works fine under Konqueror3, IE5,6, Opera7 and Mozilla *yeah*.
> Welcome aboard. Neat little demo! I might add a few
> other things and use it as a demo inside the examples/
> folder. Agree?
Of course, but it has a bug: It doesnt realize, if the mouse was "upped" when out of
the "grid-layers". This should now be fixed ;-)
May I ask some other questions:
a.) Where can I find the source for the server-side php scripts when using
communication?
I�m interrested to port them to jsp.
b.) Where can I find a programmers apidoc? The only this I found are e.g. DynObject,
DynLayer, DynDocument. But I e.g. searched how the method onmouseout in mouselistener
is calles. I didnt find it :-(
c.) How is it possible, e.g. to set the color-variable directly:
<a href="javascript:setColor('green')">green</a>
Thanks for this great project, it enables me to develop real weblications which are
100% cross-browser, and althought I like Java really much, dynapi is a much more
user-friendly solution. Really cool!
Thanks a lot, heres the code again:
<html>
<head>
<title>DynAPI Examples - Drag Over Event</title>
<script language="JavaScript" src="../src/dynapi.js"></script>
<script language="Javascript">
dynapi.library.setPath('../src/');
dynapi.library.include('dynapi.api');
dynapi.library.include('dynapi.api.ext.DragEvent');
dynapi.library.include('dynapi.functions.Image');
dynapi.library.include('dynapi.gui.events.*');
dynapi.library.include('dynapi.util.*');
</script>
<script language="Javascript">
var l1 = new Array();
var counter = 0;
var clicked = false;
var color = 'black';
var into = false;
dynapi.document.setTextSelectable(false);
var docMouseUp =
{
onmouseup : function(e)
{
clicked = false;
}
}
var gridMouseListener =
{
onmouseover : function(e)
{
if(clicked==true)
{
var s = e.getSource();
s.setBgColor(color);
}
},
onmouseout : function(e)
{
into = false;
},
onmousedown : function(e)
{
var source = e.getSource();
source.setBgColor(color);
clicked = true;
},
onclick : function(e)
{
var s = e.getSource();
s.setBgColor(color);
},
onmouseup : function(e)
{
clicked = false;
}
};
var constspace = 200;
var lines = 0;
for(counter=0; counter < 200;counter++)
{
if((counter%20==0) && counter!=0)
{
lines++;
}
l1[counter] = new DynLayer();
l1[counter].setBgColor('gray');
l1[counter].setSize(30, 30);
l1[counter].setLocation((counter%20)*30, 30*lines+constspace);
l1[counter].addEventListener(gridMouseListener);
dynapi.document.addChild(l1[counter]);
}
dynapi.document.addEventListener(docMouseUp);
function setColor(col)
{
color = col;
}
</script>
</head>
<body>
<script>
dynapi.document.insertAllChildren();
</script>
<p>
<a href="javascript:setColor('green')">green</a>
<a href="javascript:setColor('yellow')">yellow</a>
<a href="javascript:setColor('blue')">blue</a>
<a href="javascript:setColor('red')">red</a>
<a href="javascript:setColor('white')">white</a>
<a href="javascript:setColor('black')">black</a>
</p>
</body>
</html>
______________________________________________________________________________
Die Besten ihrer Klasse! WEB.DE FreeMail (1,7) und WEB.DE Club (1,9) -
bei der Stiftung Warentest - ein Doppelsieg! http://f.web.de/?mc=021184
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help