Hi, Im using this code for a dynamic photogallery.
This code is on the Mc:
onClipEvent (enterFrame) {
//+++++++++++++++++++++++++++++++++++++++++++++++
// code to fade pictures in and out
//+++++++++++++++++++++++++++++++++++++++++++++++
if (this._alpha>=0 && _root.view == 1) {
this._alpha -= 5;
}
if (this._alpha<=0) {
_root.view = 0;
loadMovie("image"+_root.pic_num+".jpg", "_root.photos");
size = this.getBytesTotal();
loaded = this.getBytesLoaded();
trace(this.getBytesLoaded());
if (size != loaded) {
_root.message = "loading image";
} else {
_root.message = " ";
}
}
if (_root.view == 0) {
this._alpha += 5;
}
if (this._alpha>=100) {
_root.view = 2;
this._alpha;
}
//+++++++++++++++++++++++++++++++++++++++++++++++
// code to make next and previous buttons behave!
//+++++++++++++++++++++++++++++++++++++++++++++++
_root.totalpictures = 9;
if (_root.pic_num<=0) {
_root.previous.enabled = false;
} else {
_root.previous.enabled = true;
}
if (_root.pic_num == _root.totalpictures) {
_root.next.enabled = false;
} else {
_root.next.enabled = true;
}
}
And on the buttons I have this code:
on (release) {
_root.view = 1;
_root.pic_num -= 1;
}
on (release) {
_root.view = 1;
_root.pic_num += 1;
}
How would I change this script to have button with numbers on instead.
If you click button3 picture 3 loads, and if you click button 5 picture 5
loads.