Well, it turns out ie8 has yet another problem. My code has a global variable (to the object) inside an object declaration that cannot be accessed by a function (that is also global). I was wondering if anybody had any thoughts on how to fix this little problem. I the code is like so:
[CODE]
function myobject(params)
{
//public
this.initialize = function(){…}
//private
some variables…
//problem variable
var mouse = new Object()
mouse.x = 0;
mouse.y = 0;
//code…
slidecontainer = document.createElement(“div”);
slidecontainer.onmousemove = function(event)
{
[INDENT]if(boo.isIE)
{
[INDENT]e = window.event;
mouse.x = e.x + document.body.scrollLeft;
mouse.y = e.y + document.body.scrollTop;[/INDENT]
}
else
{
[INDENT]e = event;
mouse.x = e.clientX + document.body.scrollLeft;
mouse.y = e.clientY + document.body.scrollTop;[/INDENT]
}[/INDENT]
}
//this function is in an interval
function moveslides()
{
/* this is where I have the problem
it seems that the function doesn’t recognize that mouse.x, or mouse for
that matter, exists. Mouse is global to the object, so why can’t this function access it? */
[INDENT]if(mouse.x)
{
code…
}[/INDENT]
}
}
The page is at[URL=”http://www.technohawks.com/test/pictures.html”]http://www.technohawks.com/test/pictures.html