This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > November 2006 > slider problems





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author slider problems
kerrysmagicshirt

2006-11-05, 10:33 pm

i'm trying to ammend a slider and in doing so i seem to have messed up the
slider. when you first click and drag the litle button jumps to the top - can
aanyine help please?

i have changed it's position from when the action script was written so i
guess it's to do with that.
here's the action scripts for it any way

//move slider and glide to the left
function slideLeft(){
if((_root.sliderPos + (Math.round(469/24) - 0.5))<469){
_root.slider._x += (Math.round(469/24) - 0.5);
}
else if((_root.sliderPos + (Math.round(469/24) - 0.5))>469){
_root.slider._x = 469;
}
}
//move slider and glide to the right
function slideRight(){
if((_root.sliderPos - (Math.round(469/24) - 0.5))>=0){
_root.slider._x -= (Math.round(469/24) - 0.5);
}
else if((_root.sliderPos - (Math.round(469/24) - 0.5))<0){
_root.slider._x = 0;
}
}
//get glide to follow sliderposition
_root.glidePos = 18 - (_root.sliderPos)*1488/469;
sliderPos = _root.slider._x;
glide._x = glidePos;

//get "drag>>" to disappear when slider is first used
if (sliderPos == 0){
_root.dragdiagnos = "Drag >>";
}
if (sliderPos>0){
_root.dragdiagnos = "";
}
//show percentage where slider is at
sliderpercentage = Math.round(_root.slider._x/4.69) + " %";


/*if (_xmouse >28 && _xmouse<520 && _ymouse>32 && _ymouse<76){
glideSpeed = (_xmouse - center)/15;
glidePos = Math.round(glidePos + glideSpeed);
if (glidePos<leftGlide){
glidePos = leftGlide;
}
if (glidePos>rightGlide){
glidePos = rightGlide;
}
glide._x = glidePos;
}*/

you can see the swf here http://www.toxiccreations.co.uk/slider/slide2.swf

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews