You won't need to write all of this object. I have a DynImage object that inserts 1 image into layer and can easily change it.
In DynImage I did not yet include auto-resizing to the size of the image, so if you get this working it should be included in DynImage and not as a DynLayer extension (I'd like to move away from having DynLayer do everything because it's not supposed to do everything, only layer management). You can retrieve the size of the image but it must be done after the image has completed loading.
You write the html with no width/height defined and set the onload handler:
<img src=file border=0 onload=update()>
In the handler you should be able to retrieve the image's .width and .height properties correctly and then resize the layer accordingly.
Dan
On Fri, Dec 01, 2000 at 02:48:46AM -0800, mi...@pr... wrote:
> I am working on a simple Dynapi image extension which will be able to manipulate and control images (image swapping, resizing, etc...)
>
> I am able to change an image's src like this...
>
> //DynAPI.document.doc.images['imagenamehere'].src=myimageobject.src
>
> In IE5.5 and NS5 I am able to change an image's width and height like this...
>
> /*
> DynAPI.document.doc.images['imagenamehere'].w=myimageobject.width
> DynAPI.document.doc.images['imagenamehere'].h=myimageobject.height
> */
>
> Does anyone know if this works in IE4/IE5 (I currently only have IE5.5 installed) and of a way to do this in NS4?
>
> --proteanman
> _______________________________________________
> Dynapi-Help mailing list
> Dyn...@li...
> http://lists.sourceforge.net/mailman/listinfo/dynapi-help
|