3 Replies Latest reply on Dec 2, 2006 6:30 AM by WebXperience

    image roll over

    majic
      Can someone point me in the direction to where I can learn how to write the script for this roll over effect. Is is a combination of Jave and Flash. Here is a link to an example of what I am talking about.
      http://www.istockphoto.com/file_search.php?action=file&text=airplanes&x=14&y=4
      Thanks
      Dan
        • 1. Re: image roll over
          Matulga
          I don't think that involves Flash or Java, actually. It looks like a JavaScript function. Each thumbnail has code like this:

          onmouseover="showtrail(' http://www1.istockphoto.com/file_thumbview_approve/2409748/2/istockphoto_2409748_jet.jpg', 'Jet','A commercial airliner prepares to land.','5.0000','1','1',253,1);" onmouseout="hidetrail();"

          which refer to JavaScript functions showtrail and hidetrail. Those functions are probably contained in one of the JavaScript files loaded in the head of the HTML document:
          <script language="javascript" src="/js/scriptaculous/prototype.js" type="text/javascript"></script>
          <script language="javascript" src="/js/utility.js" type="text/javascript"></script>
          <script language="javascript" src="/js/search.js" type="text/javascript"></script>
          <script language="javascript" src="/js/styleswitcher.js" type="text/javascript"></script>
          <script language="javascript" src="/js/dom.js" type="text/javascript"></script>
          <script language="javascript" src="/js/sifr.js" type="text/javascript"></script>
          <script language="javascript" src="/js/popupbox.js" type="text/javascript"></script>
          <script language="javascript" src="/js/filesearchhover.js" type="text/javascript"></script>
          <script language="javascript" src="/js/copyspace.js" type="text/javascript"></script>
          <script language="javascript" src="/js/lightbox.js" type="text/javascript"></script>
          • 2. Re: image roll over
            majic Level 1
            OK, so I need to break out the Javascript book. I am currious to know how or why they load so fast. Very cool script. Well off to a JavaScript forum as well.
            Thanks
            • 3. Re: image roll over
              WebXperience Level 1
              If you have Firefox with the developers toolbar you can view the javascript that is being executed. That should give you an idea of how it works.