Hey ya’ll so i just purchased this gallery from flashden, but its not quite what i want and needs some customizing. I was wondering if someone could take a look at the script and help me figure out what I need to change to make it be like how i want?
I want to edit this file to get rid of the thumbnails and just have it load straight to the big images. Also constrain the drag to only go from left to right and not vertical and keeping the images connected and not having it moving all over when you drag. As well as moving the next and previous arrows all the way to the left and right edge? kinda like this site http://www.sonypictures.com/tv/shows/cashmeremafia/main.htm
here is the script and example of what it looks like now… http://flashden.net/files/11212/index.html
showcaseBtn._visible = false
Stage.showMenu = false;
var smart:Number = 0;
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
total = xmlNode.childNodes[1].childNodes.length;
bgC = xmlNode.childNodes[0].childNodes[0].firstChild.nodeValue;
bgcolor = "0x"+bgC
myColoredObject = new Color (bg);
myColoredObject.setRGB(bgcolor);
var rows:Number = xmlNode.childNodes[0].childNodes[1].firstChild.nodeValue;
var borderF:Number = xmlNode.childNodes[0].childNodes[2].firstChild.nodeValue;
var borderC = xmlNode.childNodes[0].childNodes[3].firstChild.nodeValue;
var spacing:Number = xmlNode.childNodes[0].childNodes[4].firstChild.nodeValue;
var tubW:Number = xmlNode.childNodes[0].childNodes[5].firstChild.nodeValue;
var tubH:Number = xmlNode.childNodes[0].childNodes[6].firstChild.nodeValue;
var picW:Number = xmlNode.childNodes[0].childNodes[7].firstChild.nodeValue;
var picH:Number = xmlNode.childNodes[0].childNodes[8].firstChild.nodeValue;
space = 550+picW/2
border = borderF*2
var borderW:Number = Number(tubW)+Number(border)
var borderH:Number = Number(tubH)+Number(border)
for (i=0; i<total; i++) {
thumb* = xmlNode.childNodes[1].childNodes*.childNodes[0].firstChild.nodeValue;
image* = xmlNode.childNodes[1].childNodes*.childNodes[1].firstChild.nodeValue;
var bigImage:MovieClip = all.attachMovie("blok", "blok"+i, all.getNextHighestDepth(), {_x:i*space});
var movie:MovieClip = showcase.attachMovie("webmc", "btn"+i, showcase.getNextHighestDepth());
bigImage.mask._width = bigImage.bg._width = picW
bigImage.mask._height = bigImage.bg._height = picH
bigImage.holder._x = -picW/2
bigImage.holder._y = -picH/2
movie.mask._width = movie.bg._width = tubW
movie.mask._height = movie.bg._height = tubH
movie.border._width = borderW
movie.border._height = borderH
movie.holder._x = -tubW/2
movie.holder._y = -tubH/2
movie._x = ((1000-rows*(borderW+Number(spacing))+Number(spacing)+borderW/2)/2)+(i-(Math.round(i/rows+0.5)-1)*rows)*(borderW+Number(spacing));
movie._y = ((600-Math.ceil(total/rows-0.5)*(borderH+Number(spacing))+borderH+Number(spacing))/2)+(Math.round(i/rows+0.5)-1)*(borderH+Number(spacing));
myColoredObject = new Color (movie.border);
bordercolor = "0x"+borderC
myColoredObject.setRGB(bordercolor);
movie.holder.loadMovie(thumb*);
bigImage.holder.loadMovie(image*);
movie.btn.id = i;
movie.btn.onPress = function() {
info.play();
info.YY = 275
showcaseBtn._visible = true
showcaseBtn.gotoAndPlay(2);
posY = stageTop
showcase.YY = 1000
smart = this.id;
all.YY = 300;
all.XX = all._x = -space*(this.id)+500;
};
bigImage.XX = i*space;
bigImage.YY = 0;
all.XX = 500;
bigImage.onPress = function() {
delete this.onEnterFrame;
startDrag(this);
};
bigImage.onRelease = bigImage.onReleaseOutside = bigImage.onDragOut = function() {;
if(this.XX-this._x >=200 & smart<(total-1)){;
all.XX -= space;
smart+=1;
};
if(this.XX-this._x <=-200 & smart>0){;
all.XX += space ;
smart-=1;
};
this.play();
stopDrag();
};
}}}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“gallery.xml”);
thumb = [];
image = [];
showcaseBtn.showcase.onPress = function(){
showcaseBtn.gotoAndPlay(12);
showcase.YY = 0
all.YY = -500
}
onEnterFrame = function(){;
/if(Stage.width>1400){showcaseBtn.rightBtn.gotoAndStop(2)
showcaseBtn.leftBtn.gotoAndStop(2)
}
if(Stage.width<=1400){showcaseBtn.rightBtn.gotoAndStop(1)
showcaseBtn.leftBtn.gotoAndStop(1)
}/
stageTop = -(Stage.height-600)/2
showcaseBtn.YY = stageTop
nextBtn._y = prevBtn._y = all._y
if(smart>=(total-1)){nextBtn._visible = showcaseBtn.rightBtn._visible = false;
}else{;
nextBtn._visible = showcaseBtn.rightBtn._visible = true;
nextBtn.onPress = showcaseBtn.rightBtn.onPress = function(){;
all.XX -= space;
smart+=1;
}};
if(smart<=0){prevBtn._visible = showcaseBtn.leftBtn._visible = false;
}else{;
prevBtn._visible = showcaseBtn.leftBtn._visible = true;
prevBtn.onPress = showcaseBtn.leftBtn.onPress = function(){;
all.XX += space;
smart-=1;
};
}
};
setProperty(bg, _width, Stage.width);
setProperty(bg, _height, Stage.height);
var resizeListener:Object = new Object();
Stage.addListener(resizeListener);
resizeListener.onResize = function () {
setProperty(bg, _width, Stage.width);
setProperty(bg, _height, Stage.height);
}