SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: RandomDissolve

  1. #1
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RandomDissolve

    I saved an old copy of the techtimes that had this feature for using a RandomDissolve filter on a mouseover. I actually think Wayne had used it on one of his site but I can't find the thread he talked about it in. So here's my question. In the TechTimes, Kevin had used this javascript and HTML:
    Code:
    <script>
     function imgSwap(imgName, newImgSrc) {
       if (document.images) {
         if (document.images[imgName].filters[0])
           document.images[imgName].filters[0].apply();
    
         document.images[imgName].src = newImgSrc;
    
         if (document.images[imgName].filters[0])
           document.images[imgName].filters[0].play();
       }
     }
    </script>
     <img name="myImg" src="headers_htm_smartbutton8.gif" width="100" height="50"
     onMouseOver="imgSwap('myImg','headers_htm_smartbutton55.gif');"
     onMouseOut="imgSwap('myImg','headers_htm_smartbutton8.gif');"
    style="filter:progid:DXImageTransform.Microsoft.RandomDissolve(duration=0.50);" />
    Now I am assuming this is two different animals, an image swap function and the filter. I already have an image swap, so I'm hoping these two things aren't married in some way. I tried to get the whole script to work with what I have but I kept getting errors. I hate javascript.

    This is what I have:
    Code:
    <script type="text/javascript">
    if (document.images) { 
    		  image1up = new Image(); 
    		  image1up.src = 'images/rotateimgfill.jpg'; 
    		  image1over = new Image(); 
    		  image1over.src = 'images/rotateimg1.jpg'; 
    		   }
    .
    .
    .
    </script>
    <html>
    .
    .
    <img name="rotImg" id="rotImg" style="width: 100px; height:100px; border-left: 2px solid #FFFFFF; border-bottom: 2px solid #FFFFFF; filter:progid:DXImageTransform.Microsoft.RandomDissolve(duration=0.50);" src="images/rotateimgfill.jpg" alt="Rotating Image" />
    .
    .
     <a class="navitem" href="aboutef.php" 
          onmouseover="document.rotImg.src=image1over.src">
              About Elim</a><br />
    .
    .
    .
    </html>
    Does this make sense? How can I get this randomdissolve filter to work?

    Thanks.
    Sketch
    Aaron Brazell
    Technosailor



  2. #2
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have done lots of work with filters in the past... unfortunately i don't have much time now to look at what you've got.

    If what i say doesn't help much, then do say, and i'll look very specifically at what you've got here.

    The normal trend is to stop the filters, make a change (such as swapping the image), apply the filter and then play the image. The order of this happening sometimes changes (not all filters need to be re-applied) but normally the methodollagy is the same.

    Most of what you need came be found in the web development section of the msdn.microsoft.com/library
    under the html and dhtml reference for filters (or the css section) i'm sure you can find your way around there, and if you can't i'll post a link for you if you ask (i'm not somewhere where i can look through this).

    Let me know if you need more, and i'll answer when i'm not on my phone (i'm not in the office right now - Easter and all).

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •