A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: scrollin script messed up !! need help from the gurus

  1. #1
    Member
    Join Date
    Apr 2001
    Location
    Lake of fire
    Posts
    31

    scrollin script messed up !! need help from the gurus

    hay sup ya all ..

    i got this project .. where i have to display some products and they could be scrolled but i tried some scrolling scripts .. which aint working.. now i know that i aint good in scripting but i m good in animation and stuff..

    nways i have attached an fla file which i hope might explain every thing ..

    chill.. hope to get this thing done and over with ..

    thanx in advance..
    regards
    dx
    Attached Files Attached Files
    peace no war !!

  2. #2
    Senior Member tigersbite's Avatar
    Join Date
    Apr 2002
    Posts
    314
    Here's a solution.
    Attached Files Attached Files

  3. #3
    Member
    Join Date
    Apr 2001
    Location
    Lake of fire
    Posts
    31
    well thanx aaaaaaaalottt for the help .. i dint open the file yet but i m sure its what i expect .. once again .. thanx man for all ur help .. and ps which book do u think might be good for flash designers like me that would like to go more deeper then just tel target and stuff.. i mean i want to learn more action scripting..

    chill
    dx
    peace no war !!

  4. #4
    Senior Member tigersbite's Avatar
    Join Date
    Apr 2002
    Posts
    314
    Not sure which book. I've gotta get one myself to get up to date on MX. I just thumb through them to see which one seems like my speed.

  5. #5
    Member
    Join Date
    Apr 2001
    Location
    Lake of fire
    Posts
    31
    ok thanx for every thing . one more thing ... if i want to change the number of products to display i mean like if i want more products or less products what should i change i tried to change

    --------------- orignal ---------------

    scrollIncrement = 84;
    glideIncrement = 20;
    direction = 0;
    dragFlag = false;

    function doGlide() {
    proroll._x += glideIncrement*direction;
    scrollbar._x += glideIncrement*-direction;
    if (scrollbar._x > 566) {
    scrollbar._x = 566;
    proroll._x = -542;
    }
    else if (scrollbar._x <24) {
    scrollbar._x=24;
    proroll._x = 0;
    }

    }

    function doDrag() {
    if (dragFlag == true) {
    proroll._x = -scrollbar._x + 24;
    updateAfterEvent();
    }
    }

    --------------------------------------------end orignal

    to display more products


    -------------------------------- EDITED BY ME

    scrollIncrement = 84;
    glideIncrement = 10;
    direction = 0;
    dragFlag = false;

    function doGlide() {
    proroll._x += glideIncrement*direction;
    scrollbar._x += glideIncrement*-direction;
    if (scrollbar._x > 618) {
    scrollbar._x = 618;
    proroll._x = -642;
    }
    else if (scrollbar._x <24) {
    scrollbar._x=24;
    proroll._x = 0;
    }

    }

    function doDrag() {
    if (dragFlag == true) {
    proroll._x = -scrollbar._x + 24;
    updateAfterEvent();
    }
    }
    peace no war !!

  6. #6
    Senior Member tigersbite's Avatar
    Join Date
    Apr 2002
    Posts
    314
    Here's a modified version for you. This way, you can add any number of items (change proroll's width) and the scrollbar and scroll limits will automatically adjust.
    Attached Files Attached Files

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center