Hey Jirka,
If you have not already figured this out, try this:
for (i=1,j=28;i<=4;i++,j+=20){
eval("DynAPI.document.addChild(cb"+i+"L=new
DynLayer(null,"+j+",395,20,20))");
var o = eval ("cb"+i+"L");
eval("o.setBgImage(cb" +i+ "g.src)");
o.numh=i;
eval ("cb" +i+ "E = new EventListener(cb"+i+"L)");
var Ev = eval ("cb"+i+"E");
eval("cb"+i+"E.onmouseover=function(e){
p=e.getSource(); alert(p.numh); p.css.cursor =
'hand';}");
eval("cb"+i+"E.onclick=function(e) {
alert('cbClick');}");
o.addEventListener(Ev)
}
}
}
Your event listeners were picking up the last value of
i which is always 5. You need to store the value of i
in a variable of the label as in the example above.
Also, the cursor change will only work in IE.
Cheers,
Dave C. "You Changed What?!?
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help