0 Replies Latest reply: Apr 16, 2013 9:58 AM by whatalotofrubbish RSS

    Grow/Shrink Effects behavior in DW 5.5

    whatalotofrubbish Community Member

      I am working on a page at http://www.tyneships.co.uk/phones/keys.php. Click on any letter on the page, and then on any of the links on the left hand side of the page that it takes you to.(all temporary code).

      This takes you to a page which loads a picture and shrinks it down to a size. When you click on the picture, it expands to fill the page. Click on it again, and it shrinks back again.

      I did this using the DW5.5 grow/shrink effect, to be found under Window/Behaviors/+/Effects/Grow/Shrink.

      The code is here:

      <img src="../photos/<?php echo $row_showshipset['thumblink']; ?>" width="800" height="600" title="Click to Zoom or Shrink" onClick="MM_effectGrowShrink(this, 1000, '100%', '300%', true, false, false)" onload="MM_effectGrowShrink(this, 0, '100%', '40%', false, false, false)">

      On load, it is set to shrink the image down from 100% to 40% of its size in 0 miliseconds. When clicked on, it grows to , and then when it is clicked on, it grows from 100% to 300%  to fit its preset 800 x 600.

      This would be great, except for the fact that as the picture loads, it first of all fills the screen before the javascript routine shrinks it into its table.

      The same happens if you click the next button under the photo while it is expanded.

      There used to be a behaviour called "Pre-Load Images" that I thought may fix this problem, but it is no longer ioncluded in the DW package.(or at least I cannot find it)

      Is there any way to obscure the image until it has loaded and shrunk down to its smaller size?

      Howard Walker