I feel embarassed and stupid asking this, but I post this message anyway.
I got this code from other gallery thread.
There are 3 gallery within xml : gallery 1, gallery 2, abd gallery 3.
This is the first function to call gallery list :
menuBoot = function(){
galleryspacing = 5;
for(var i=0;i<_global.gallery_xml.firstChild.childNodes.length;i++){
gallerymc = gallerycontainer.attachMovie("GalleryButton","button_mc"+i,i);
galleryloader = gallerymc.galleryloader;
galleryaux = gallerymc.galleryaux;
gallerymc._y = i*(20+galleryspacing);
gallerymc.gallerybg_mc.setRGB(this._parent.gallery_btn_bg);
gallerymc.galleryborder_mc.setRGB(this._parent.gallery_btn_border);
gallerymc.btntext.btnname_txt.text = gallery_xml.firstChild.childNodes*.attributes.name;
gallerymc.btntext.btnname_txt.textColor = this._parent.gallery_btn_txt;
gallerymc.id = i;
gallerymc.onRelease = function(){
if (_global.numofthumbs != 0) {
var nums = _global.numofthumbs;
for (var g = 0; g < nums; g++){
this._parent._parent.thumbmenu_mc.thumbcontainer["thumb_mc"+g].unloadMovie();
}
}
_root.gallerytitle.text = gallery_xml.firstChild.childNodes[this.id].attributes.name;
_root.caption.text = gallery_xml.firstChild.childNodes[this.id].childNodes[0].attributes.caption;
_root.picholder_mc.loadPic(gallery_xml.firstChild.childNodes[this.id].childNodes[0].attributes.source);
_global.delayedThumbBoot = setInterval(this._parent._parent.thumbmenu_mc.thumbBoot, 50, this.id);
}
gallerymc.galleryaux.onEnterFrame = function(){
if(this._parent.galleryloader._width > 0){
delete this.onEnterFrame;
this._parent.onRelease = function(){
}
}
}
setGalleryRollOver();
}
}
And this is is the function to display thumbnail when any of the gallery above is pressed using onRelease respectively
spacing = 10;
thumbBoot = function(calledGallery:Number){
clearInterval(_global.delayedThumbBoot);
var gallery_ref = _global.gallery_xml.firstChild.childNodes[calledGallery];
_global.numofthumbs = gallery_ref.childNodes.length;
for(var i=0;i<gallery_ref.childNodes.length;i++){
thumbmc = thumbcontainer.attachMovie("Thumbs_MC","thumb_mc"+i,i);
//thumbmc.brand.loadMovie(_root.thumb_brand_pic);
thumbmc.thumbbg.setRGB(thumbnail_holder);
thumbmc.spacer.setRGB(thumbnail_border);
thumbloader = thumbmc.thumbloader;
thumbaux = thumbmc.thumbaux;
thumbmc._x = i*(75+spacing);
thumbloader.loadMovie(gallery_ref.childNodes*.attributes.thumb);
thumbmc.id = i;
thumbmc.onRelease = function(){
// attributes... Caption... Full.. Source... Thumb
_global.downloadlink = gallery_ref.childNodes[this.id].attributes.full;
this._parent._parent._parent._parent.caption.text = gallery_ref.childNodes[this.id].attributes.caption;
this._parent._parent._parent._parent.picholder_mc.loadPic(gallery_ref.childNodes[this.id].attributes.source);
}
thumbmc.thumbaux.onEnterFrame = function(){
if(this._parent.thumbloader._height > 0){
delete this.onEnterFrame;
}
}
setThumbRollOver();
}
}
My question is : How to use that function so that I can load gallery 1 automatically without having to press the gallery list ?
If it’s possible I also want the first (big) image of 1st thumbnail of gallery 1 also automatically loaded.
Thanks alot for helping me out