To Jordi: Thank you--that was precisely the problem.

To Everyone (also Jordi): I am now using Version 2.53 because I understood
that it fixed some problems with event catching in NS.  As I mentioned, I am
using NS 4.6.  The following code seems fairly straightforward to me and it
works in IE, but it generates nothing in NS 4.6.

For the introduction, this project is a little filmstrip page.  The images
are displayed like a filmstrip in small size and if the user clicks on an
image then the large version appears for his viewing pleasure.  I add the
mouse click event listener to each frame.

Any ideas are appreciated.

////////////////////////
//
// buildFrames
//
////////////////////////
function buildFrames() {
    filmScreen = new DynLayer(null,screen.width/2-filmFrameWidth/2,
                              70,filmFrameWidth,230)
    filmFrames = new Array(filmLength)
    for (i=0; i<filmLength; i++) {
        filmFrames[i] = new DynLayer(null,filmFrameWidth,0,300,300)
        filmFrames[i].setHTML("<IMG SRC='"+filmImages[i].src+"'>")
        ffel = new EventListener(filmFrames[i])
        if (i % 2 == 0) {
            ffel.onslideend=function(e) {
                filmScreen.onslideend(e)
            }
        }
        ffel.onclick=function(e) {alert(1)
            thisframe = e.getTarget()
            showPicture(thisframe.num)
        }
        filmFrames[i].addEventListener(ffel)
        filmFrames[i].num = i+1
        filmScreen.addChild(filmFrames[i])
        filmFrames[i].slideActive = false
    }
    filmFrames[0].moveTo(0)
    filmScreen.textLayer = new DynLayer(null,0,170,filmFrameWidth,50)
    filmScreen.addChild(filmScreen.textLayer)
    filmScreen.textLayer.setHTML("<FONT COLOR='white' SIZE=2>"+
                                 eval(filmName+"Text[0]")+
                                 "</FONT>")
    filmScreen.frameNum = 0
    filmScreen.running = false
    filmScreen.onslideend = function() { }
    DynAPI.document.addChild(filmScreen)
}

Hershel


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to