Again, I really like the pausescroller. It's just about perfect, and I've extended it as outlined in another post.
I'd like to, however, rein in the use of global variables and requiring that pausescroller be instantiated outside of any other functions. The reason behind this (besides just good code practice) is that I'm build my data array from an XML document. Sure IE has an async=false, but to my knowledge Mozilla does not: there will be no way to delay the instantiation of pausescroller until after data loads without calling it from within a function at the time of data availability.
One thing that eludes me are these lines:
Is that adding an onload event to "window" and not to the obj pausescroller itself? Does window.onload fire any time other than, say, body.onload?var scrollerinstance=this;
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
Any tips on this?



Reply With Quote


Bookmarks