Hi,
I gave your code a quick look, and it looks very nice
I like this:
x = (x + 16) & ~31;

I really think the easiest option is to make the images the same size as the
squares, doesn't seem like an unreasonable demand, and I tried it, the code
works very well without the table hack.

If you can make this, I don't think you need to ask if DynAPI is prime
ready, once you know javascript sufficiently you can use DynAPI to do almost
anything, but always keeping various browser bugs in mind.
NS4 has a lot of them, nesting things creates problems.
I recently spent several days debugging someone's Dreamweaver code that was
crashing NS , One page had a menu of rollover images nested in tables ,
nested in a large table, nested in two divs, and scrolling with the page.
Does this mean Dreamweaver isn't a valid tool? (probably it does, but never
mind).
And yes, there is still a lot of work to be done, feel free to chip in when
you can.
There are quite a few sites using DynAPI, there's some links on the
home-page, and some on my site.

If you use DynImages for your chess-pieces, instead of a dynlayer with an
image, the dynimage takes the size of the image, and can be manipulated like
a dynlayer, you could center it by code then, something like this:

 x = (x + 16) & ~31;
 y = (y + 16) & ~31;
 x+=(32-target.w)/2
 y+=(32-target.h)/2

But sadly there's still a bug with NS4 and dynimage, causes errors when you
resize the browser, so I think the easiest is to adapt the image size, and
keep the code as it is.

Nice stuff.

Cheers,
Richard Bennett

[EMAIL PROTECTED]
www.richardinfo.com
(Everything running on, and ported to DynAPI2.53)
visit the DynAPI homepage (and FAQ) ::
http://dynapi.sourceforge.net/dynapi/index.php?menu=1
Browse (and search) the mailinglist here:
http://www.mail-archive.com/index.php3?hunt=dynapi







----- Original Message -----
From: "Nick Pelling" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 03 July, 2001 19:21
Subject: Re: [Dynapi-Help] Vertically aligning IMG in a dynlayer... on older
browsers?


> I decided to try out the original suggestion (even though it didn't really
> fit with what I was trying to do).
>
> So: I adapted my code to asynchronously load the chess piece graphics, and
> (using the Image.onload method) to then update the associated layer's HTML
> once it had loaded.
>
> However, under NS4.xx, occasionally some onload calls appear to get missed
> - so layers never get initialised. Bah!
>
> So: don't assume that the simple answer to this works either. :-(
>
> Cheers, .....Nick Pelling.....
>
> PS: has DynAPI been used in any big websites? I'm starting to get a
> not-quite-ready-for-prime-time vibe off this. :-|
>
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>


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

Reply via email to