From: Leif W <war...@us...> - 2005-08-10 17:12:51
|
> From: "Bob Jamison" <bob...@gr...> > Sent: 2005 August 09 Tuesday 19:09 > > I have a child layer, in which I want to be able to click and get the > x and y values of where I clicked -- so far, it's getting the x and y > value relative to the page, not the layer. I'm using 3.0. Hi. Which 3.0? ;-) beta1 (2 years old) or beta2 (released last week). And which browser(s) yield the erroneous behavior? To my understanding, getX/Y is relative to parent, and getPageX/Y is relative to page. So the usage seems correct at first glance. I'll take a closer look. Hmm, what looks odd to me are these... var photo = dynapi.document.addChild( new DynLayer(null,0,0,600,400) ); var bg1 = photo.addChild(new DynLayer(null,0,0,600,400)); var lyr1 = photo.addChild(new DynLayer(null,$x,$y,10,10,'red')); Normally, I assign DynLayer directly to a variable, configure it, and when done use dynapi.document.addChild. I'll try both ways and see what happens. > I have a relative layer down in the html: > dynapi.document.insertChild(photo,'relative'); This I don't understand... you already added the DynLayer "photo" to the document once above, now you wish to insert it? So there should be two instances, is this correct? Is it even possible, again, I never tried that. :-) I'll fiddle around and get back later today. Leif |