Hi,
I wonder if anyone have an clue how to make the gallery/pictures stop scrolling 20 or 30px to the right of the webbrowser. I think something has to be added in the end of the code under IMAGES DRAGGING FUNCTION.
This is the page:
www.flaw.se
Would really appreciate your help.
Heres the code for the scroller:
//FUNCTION UPDATE IMAGES SCROLL WHILE PRELOADING
function updateScroll() {
//SCROLL ACTIVE OR NOT
if (project.images._width > (Stage.width-30)) {
project.scrollBase._visible = true;
project.scrollBt._visible = true;
} else {
project.scrollBase._visible = false;
project.scrollBt._visible = false;
}
//IMAGES SCROLLING FUNCTION
var easingValue:Number = 8;
var mouseWheelValue:Number = 6;
var targX:Number;
Tweener.addTween(project.scrollBase, {_color:"0x"+scrollBaseColor});
Tweener.addTween(project.scrollBt, {_color:"0x"+scrollButtonColor});
Tweener.addTween(project.scrollBase, {_height:3, time:1, delay:0.5});
Tweener.addTween(project.scrollBt, {_height:9, time:1, delay:0.5});
project.scrollBt.onRollOver = function (){
Tweener.addTween(project.scrollBt, {_color:"0x"+mainColor, time:0.5, transition:"linear"});
Tweener.addTween(project.scrollBt.arrow, {_y:3, time:0.5});
}
project.scrollBt.onRollOut = function (){
Tweener.addTween(project.scrollBt, {_color:"0x"+scrollButtonColor, time:1});
Tweener.addTween(project.scrollBt.arrow, {_y:0, time:0.5});
}
project.scrollBt.onPress = function() {
drag();
if (mainPath.childNodes[1].childNodes[sectionNum-1].childNodes[projectNum-1].childNodes[1].childNodes[0].nodeValue !== "NO") {
closeDescription();
}
startDrag(this, false, 0, 0, project.scrollBase._width - project.scrollBt._width, 0);
}
project.scrollBt.onRelease = project.scrollBt.onReleaseOutside = function () {
Tweener.addTween(project.scrollBt, {_color:"0x"+scrollButtonColor, time:1});
Tweener.addTween(project.scrollBt.arrow, {_y:0, time:0.5});
stopDrag();
}
//IMAGES DRAGGING FUNCTION
function drag() {
Tweener.removeTweens(project.images);
project.images.onEnterFrame = function() {
scrollAmount = (this._width - project.scrollBase._width) / (project.scrollBase._width - project.scrollBt._width);
targX = -project.scrollBt._x * scrollAmount;
this._x -= (this._x - targX) / easingValue;
}
}
}
};
All the best, gracias