Roll Over effect with images

3 posts by 2 authors in: Forums > CMS Builder
Last Post: July 16, 2008   (RSS)

By willbegood - July 15, 2008

Hello, i need to do a "before > after" effect showing images.
The idea is to use a rool over effect.
So i create in my menu 1 field upload "before" and another one "after".
No i'm trying to put all this in this :

<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','after.jpeg',1)"><img src="before.jpeg" name="Image5" border="0" id="Image5" /></a>

How to?

I have the following code that show my "before" image
<?php foreach ($record['imagestate1'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>

<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>

<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>

<?php endif ?>
<?php endforeach ?>

And i have this second one code that display the "after" image.

<?php foreach ($record['imagestate2'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>

<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>

<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>

<?php endif ?>
<?php endforeach ?>

Re: [willbegood] Roll Over effect with images - Solved BUT

By Donna - July 16, 2008

Hi there!

Glad to hear you got that figured out. :)
Donna

--
support@interactivetools.com