Results 1 to 7 of 7

Thread: Question about the CMotion Gallery and aut0-start

  1. #1
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Question about the CMotion Gallery and aut0-start

    1) Script Title:
    CMotion Gallery
    2) Script URL (on DD):
    http://www.dynamicdrive.com/forums/s...ad.php?t=11839
    3) Describe problem:
    No problem I like the script a lot. But is there a parameter to create an auto start? That is to have the gallery start to move before an actual mouse-over. This was requested by a new client. And thank you for the script.
    Last edited by Snookerman; 06-26-2009 at 06:33 AM.

  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

    The script is now in the library (has been for awhile):

    http://www.dynamicdrive.com/dynamici...iongallery.htm

    To answer your question, add this code (red) to motiongallery.js:

    Code:
    if (document.body.filters)
    onresize()
    scrollspeed=2;
    moveleft();
    }
    window.onload=fillup;
    - John
    ________________________

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

  3. #3
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Thanks and additional

    John, thank you very much.
    It works well.

    Now, a small additional request: code to continue the movement the user initiated after mouse out?

    Gregg

  4. #4
    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

    Code:
    function fillup(){
    if (iedom){
    crossmain=document.getElementById? document.getElementById("motioncontainer") : document.all.motioncontainer;
    if(typeof crossmain.style.maxWidth!=='undefined')
    crossmain.style.maxWidth=maxwidth+'px';
    menuwidth=crossmain.offsetWidth;
    cross_scroll=document.getElementById? document.getElementById("motiongallery") : document.all.motiongallery;
    actualwidth=document.getElementById? document.getElementById("trueContainer").offsetWidth : document.all['trueContainer'].offsetWidth;
    if (startpos)
    cross_scroll.style.left=(menuwidth-actualwidth)/startpos+'px';
    crossmain.onmousemove=function(e){
    motionengine(e);
    }
    
    crossmain.onmouseout=function(e){
    scrollspeed=2;
    return;
    stopmotion(e);
    showhidediv("hidden");
    }
    }
    loadedyes=1
    if (endofgallerymsg!=""){
    create . . .
    Note: If you want the speed to stay the same as it was, skip scrollspeed=2. I liked using it to get the gallery moving at a nice average speed onmouseout.
    - John
    ________________________

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

  5. #5
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Thanks again

    You real outdid yourself there. It works as promised. Thank you again!

    Gregg Di Lorenzo

  6. #6
    Join Date
    Jun 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    sorry for bumping this old thread

    i added

    scrollspeed=2;
    return;

    and it doesn't work anymore. the entire script stops working and there is no scrolling at all

    help? btw i'm using the newest firefox

  7. #7
    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

    Please start a new thread for a new question.
    - John
    ________________________

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

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
  •