PDA

View Full Version : xml photogallery thumbs prob.. plz help



sundeep_02tv26
02-22-2007, 12:08 PM
i am doing xml photogallery for my project.
i completed doing the gallery part but at one point i am stucked.
here i am loading thumbnails into thumb_mc in _y direction. i have two buttons (up_btn and down_btn) for the thumb_mc to move up and down directions.

for up_btn the script is :-
on (press, rollOver) {
this.thumbnails._y -= 77;
}

and for down_btn the script is:-
on (press, rollOver) {
this.thumbnails._y += 77;
}

but the thumb_mc is moving further than the wanted range. how to say upto the displayed thumbs range only.? plz help

BLiZZaRD
02-22-2007, 04:57 PM
use if/else statements.

Remember also when you are dealing with equalities of a single var to double up your signs. So something like:



on(press){
if (this.thumbnails._y >= 77){
this.thumbnails._y -= 1);
}
else if (this.thumbnails._x >= 77){
this.thumbnails._x -= 1);
}
}


Now this isn't exact, as I don't know the rest of your coding, are you using arrays, loadMovie() etc, but this should get you an idea.