There <b>is</b> bug in dynimage.js on current snapshot!
The problem is that: no resizing actually takes place in function loadercheck() due to 
DynImage.loadimages[i].img.dynimage is allways undefined.
Attached file contains corrected version of dynimage.js.
(tested with IE5, NS4.7 & NS6 under Windows 2000).
Moreover, when code tries to load non-cached image after DynImage loadercheck timer 
finished,
timer sets again.
Due to such behaviour, we need to add this lines to button.js:

Button.prototype.setImage = function(imgObj) {
        this.img = imgObj;
        if (!this.imglyr) {
                this.imglyr = this.addChild(new DynImage(imgObj));
                this.imglyr.setVisible(false);
        }
        else this.imglyr.setImage(imgObj);
  this.imglyr.addEventListener(Button.imglyrlistener); //added
};

Button.imglyrlistener=new EventListener(); //added
Button.imglyrlistener.onresize=function(e){//added
var o = e.getSource(); //added
o.w=o.img.width; o.h=o.img.height; o.parent.recenter();} //added

It seems to solve problems with images on scrollpane buttons (formerly they weren't 
visible until page reloading).

Yurij Silvestrov

dynimage-alt.zip

Reply via email to