Results 1 to 3 of 3

Thread: CMotion Gallery and mouseover image interference

  1. #1
    Join Date
    Dec 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy CMotion Gallery and mouseover image interference

    1) Script Title: CMotion Image Gallery

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...iongallery.htm

    3) Describe problem: This script has been working awesomely, until I added a new mouseover image outside of the gallery area (in a separate table cell). After that, it stopped scrolling. Is there some setting built in that prohibits mouseover images? I'm pretty new at this, and had some difficulty figuring out which changed caused this, as I was rebuilding an old page around my working CMotion script. I'm using Dreamweaver.
    I tried adding a plain old image in that problematic cell, and all works just fine.
    Any help would be much appreciated.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Sounds like an onload conflict. In motiongallery.js, using a text only editor like NotePad, change this highlighted line near to the end of the script:

    Code:
    creatediv();
    positiondiv();
    }
    if (document.body.filters)
    onresize()
    }
    window.onload=fillup;
    
    onresize=function(){
    if (typeof motioncontainer!=='undefined'&&motioncontainer.filters){
    motioncontainer.style.width="0";
    motioncontainer.style.width="";
    motioncontainer.style.width=Math.min(motioncontainer.offsetWidth, maxwidth)+'px';
    }
    menuwidth=crossmain.offsetWidth;
    cross_scroll.style.left=startpos? (menuwidth-actualwidth)/startpos+'px' : 0;
    }
    so that the code reads like so:

    Code:
    creatediv();
    positiondiv();
    }
    if (document.body.filters)
    onresize()
    }
    if (window.addEventListener){
    	window.addEventListener('load', fillup, false);
    }
    else if (window.attachEvent){
    	window.attachEvent('onload', fillup);
    }
    
    onresize=function(){
    if (typeof motioncontainer!=='undefined'&&motioncontainer.filters){
    motioncontainer.style.width="0";
    motioncontainer.style.width="";
    motioncontainer.style.width=Math.min(motioncontainer.offsetWidth, maxwidth)+'px';
    }
    menuwidth=crossmain.offsetWidth;
    cross_scroll.style.left=startpos? (menuwidth-actualwidth)/startpos+'px' : 0;
    }
    The browser cache may need to be cleared and/or the page refreshed to see changes.

    There may still be other problems. If you want more help:

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Part of the problem solved

    I figured out one issue: I had accidentally replace my mouse over script with the motion gallery script. I know it sounds really stupid, but I'm just figuring things out as I go along.
    But, still, the scrolling script no longer works when I use the Dreamweaver "insert mouseover image too" so I will give this a try and see what happens.
    Thanks for the quick answer!

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
  •