• User

    Settaggio freccie di scorrimento per filmato

    Ho realizzato una barra di scorrimento per un clip filmato.
    Per chi volesse vederlo

    http://www.banalik.mrw.it/
    'skip intro' per le due intro
    e poi dal menu scegliere 'Portfolio'.

    Con lo scroller non ci sono problemi.
    Se invece faccio scorrere con le frecce
    la scorrimento arriva fino ad un certo punto
    e poi si ferma.
    Dal codice non riesco a trovare quale sia il valore da cambiare.
    Qualcuno può aiutarmi?

    Questo è il codice AS all'interno dell'istanza dello scroll:

    this.startScroll = function(active, type) { // declare the startScroll() method
    if (active) { // if the up, down, or middle scroller are pressed
    this.type = type; // set the type variable on the scrollBar instance
    if (type != "mid") { // if the middle scroller is NOT pressed
    this.onEnterFrame = function() { // define an onEnterFrame() method
    if (type == "up") { // if the up (left) button is clicked
    if(target._x <= target.startX-increment){ // then check to see if the current X position of target is less than its starting point (minus the increment that's going to be added)
    target._x += increment; // if it is less, then add the increment to the X position of target
    } else { // otherwise
    target._x = target.startX; // set the X position of target back to its starting point
    }
    } else if (type == "down") { // otherwise,if the down (right) button is clicked
    if(target._x >= target.endX+increment){ // then check to see if the current X position of target is greater than its ending point (plus the increment that's going to be added)
    target._x -= increment; // if it is greater, then subtract the increment from the X position of target
    } else { // otherwise
    target._x = target.endX; // set the X position of target to its ending position
    }
    }
    updateScroller("arrow"); // update the position of the middle scroller
    };
    } else { // otherwise, if the middle scroller is pressed
    this.onMouseMove = function() { // establish an onMouseMove() method
    updateScroller("mid"); // update the position of the middle scroller and content
    updateAfterEvent(); // refresh the stage
    };
    }
    } else { // if the up, down, or middle buttons are released
    this.onEnterFrame = null; // remove the onEnterFrame() method
    this.onMouseMove = null; // remove the onMouseMove() method
    }
    };
    function updateScroller(type) { // define the updateScroller() function
    var a = scroller._y; // distance traveled by scroller
    var b = 59; // total length of scrolling area
    var c = target.rangeX; // total span of target clip
    var d = target.startX; // offset position of target clip
    var e = target._x; // current position of the target clip
    if (type == "mid") { // if the middle scroller is engaged
    target._x = (c*(a/b))+d; // then set the X position of target to the result of our equation
    } else { // otherwise, if the arrow buttons are engaged
    scroller._y = b*((e-d)/c); // then set the Y position of the middle scroller to this result
    }
    }

    // this .as file establishes movieWidth and movieHeight (in pixels)
    #include "getMovieSize.as"

    increment = 10; // this value (in pixels) will be added or subtracted with each click of the up or down arrows, respectively
    target = _parent.content; // target MovieClip object
    target.startX = (target._width/3.0); // starting position (offset) of target clip
    target.endX = movieWidth-(target._width/2.2); // ending position of target clip
    target.rangeX = target.endX - target.startX; // total span of target clip
    target._x = target.startX; // set the target clip to its starting position