I am very close to creating an _x slide that would reveal several different images/buttons inside a mask. I need the buttons to be visible or invisible ( depending on img_mc _x position ) both at the beginning and end of the graphic that is being slid across the mask. ( img_mc) The “back” button should be invisible only if img_mc is at the left most position ( minX )…and the “next” button to be invisible at the right most position ( maxX ). so far I can make “next” work well but “back” is giving me issues…Primarily I cant hide it initially…and when it does get hidden…it dosnt reveal after img_mc leaves the determined hide position.
please advise!!!
heres the code…
var minX =250;
var maxX = -3536;
var stepX = -757.25;
back_btn.onRollOver=function(){
back_btn.gotoAndPlay(“blink”);
}
back_btn.onRollOut=function(){
back_btn.gotoAndStop(“start”);
}
back_btn.onRelease = function() {
img_mc._x -= stepX;
if(img_mc._x>=maxX){
back_btn._visible = true;
next_btn._visible = true;
}
};
next_btn.onRollOver=function(){
next_btn.gotoAndPlay(“blink”);
}
next_btn.onRollOut=function(){
next_btn.gotoAndStop(“start”);
}
next_btn.onRelease = function() {
img_mc._x += stepX;
if(img_mc._x<=maxX){
back_btn._visible = true;
next_btn._visible = false;
}
};