4 Replies Latest reply on May 4, 2008 10:57 AM by Dark7722

    Pic Ratio and Swap Image Behaviour

    Dark7722
      Alrite guys, iv been picking up my web design skills by developing my own site, and as part of that iv design a gallery with thumbnails circling a central picture. now iv used the swap image behaviour to change the thumnail to the central large pic, unfortunatly the pictures are stretching to the limit of the slice, is their anyway to fix the ratio of all the pics am using so they come up in their original size rather than being stretched beyond the original?

      Cheers

      Dark
        • 1. Re: Pic Ratio and Swap Image Behaviour
          pixlor Level 4
          In your HTML, do you have height and width set on your central image? If so, then whatever you put in that spot will be resized to those dimensions. The better choice would be to crop your images so that the large version of each is the same size. (Or add padding to them so they at least look that way.
          • 2. Pic Ratio and Swap Image Behaviour
            Dark7722 Level 1
            the issue iv got is not the large images being reduced (am quite happy to crop them to fit) but the much smaller images being stretched from a horizontal rectangle to a much large vertical rectangle, their a different shape from the central image to begin with, would i be able to insert padding to change the dimensions of the stretched image?
            • 3. Re: Pic Ratio and Swap Image Behaviour
              Level 7
              You can do this many ways ways -

              1. Don't use swap image - use Show/Hide layer instead. Have the alternate
              image in a hidden layer that is shown when the trigger is 'tickled'. Using
              this method you can have images that are any dimension.

              2. Use swap image, but remove the dimensions from the original image's tag,
              i.e., change this -

              <img name="original" width="150" height="220" ...

              to this -

              <img name="original" ...

              Now when you swap in your offsize image, there is no predefined size to
              change it to. Be aware that this method may well result in an unpleasant
              and undesirable 'rearrangement' of your page layout as it adjusts to your
              new image's dimensions.

              3. Pad the smaller image with canvas background color on all sides so that
              all the images *are the same size*.

              4. Use a SetTextofLayer behavior to change the image reference in a layer
              positioned so that it will show the desired larger image in the proper
              place.

              5. Use the PVII ShowPic extension - http://www.projectseven.com/

              Take your pick....



              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              ==================


              "Dark7722" <webforumsuser@macromedia.com> wrote in message
              news:fusck6$of2$1@forums.macromedia.com...
              > the issue iv got is not the large images being reduced (am quite happy to
              > crop
              > them to fit) but the much smaller images being stretched from a horizontal
              > rectangle to a much large vertical rectangle, their a different shape from
              > the
              > central image to begin with
              >

              • 4. Re: Pic Ratio and Swap Image Behaviour
                Dark7722 Level 1
                cheers guys, all sorted