View Full Version : The MAMMA of all prototypes ever created is finished
buggedcom
09-10-2002, 10:43 AM
I have finally finished, after 5 days a code that dynamically creates everything to do with a gallery, and while there could be one or two extra tweeks put in, if you are going to use it you can do it yourself. It preloads thumbnails, determines if it needs a scroller, loads images, scales them to a box of your choosing, preloads the main images etc etc etc.
EDIT BELOW
I'm sorry to say that the example for the prototype no longer exists but the example for the component that has been developed in this thread does exist
http://photogallery.buggedcom.co.uk
here is the code
// If you would like to see this in action please go to
// http://buggedcom.50megs.com/protogallery.html
//
MovieClip.prototype.photoGallery = function(path, trgt, seed, maxSeed, format, fIn, thumbX, thumbY, thumbOutline, maskHeight, arrowSize, scrollSpeed, w, h, lbH, dist, jpgLoadTxt, txtXPos, txtYPos, txtStyle, fontName, txtSize, txtClr, html, bold, Italic, boxWidth, boxHeight, imageX, imageY, boxCentred, imageCentred, trgtImage) {
_global.maxSeed = maxSeed;
_global.seed = seed;
_global.path = path;
_global.thumbX = thumbX;
_global.thumbY = thumbY;
_global.format = format;
_global.trgtImage = trgtImage;
_global.imageCentred = imageCentred;
_global.dist = dist;
_global.boxWidth = boxWidth;
_global.imageX = imageX;
_global.imageY = imageY;
_global.fIn = fIn;
_global.scrollSpeed = scrollSpeed;
seedOrig = seed;
path._x = thumbX;
path._y = thumbY;
imageBox(boxHeight, imageY, boxCentred);
thumbBox(thumbOutline, maskHeight);
howManyNails(txtStyle, jpgLoadTxt, txtXPos, txtYPos, fontName, txtSize, txtClr, bdr, bdrClr, html, bold, italic);
path.createEmptyMovieClip("thumbs", 1);
path.thumbs._x = -dist;
scrollMask(maskHeight, thumbX, thumbY);
loadThumbnails(trgt, format, dist, prev_x, prev_w);
drawBar(w, h, lbH, dist);
onEnterFrame = function () {
imageProgressBarRun();
removeImageBar();
imageSquash();
imageCentre();
loadIn(path.imageStuff.image);
needArrows(arrowSize, dist, h);
path.thumbs["thumb"+seed].onPress = Press;
path.thumbs["thumb"+seed].onRelease = Release;
path.thumbs["thumb"+seed].onEnterFrame = EnterFrame;
if (allFadedIn != true) {
loadingBarRun(txtStyle);
if (seed<maxSeed) {
prev_x = path.thumbs["thumb"+seed]._x;
prev_w = path.thumbs["thumb"+seed]._width;
if (path.thumbs["thumb"+seed]._width>0) {
removeBars();
if (path.thumbs["thumb"+seed]._alpha>=100) {
_global.seed = seed += 1;
drawBar(w, h, lbH, dist, prev_x, prev_w);
loadThumbnails(trgt, format, dist, prev_x, prev_w);
} else {
loadIn(path.thumbs["thumb"+seed]);
}
}
} else if (seed == maxSeed && path.thumbs["thumb"+seed]._width>0) {
loadOut(path.totalLB);
loadOut(path.totalLBB);
path[jpgLoadTxt].removeTextField();
removeBars();
loadIn(path.thumbs["thumb"+maxSeed]);
if (path.thumbs["thumb"+seed]._alpha>100) {
allFadedIn = true;
}
}
}
};
};
//
// Fading functions
//
function loadIn(mc) {
if (mc.getBytesLoaded() == mc.getBytesTotal() && mc._alpha<100 && mc._width>0) {
if (mc._alpha<100) {
mc._alpha += fIn;
}
}
}
function loadOut(mc) {
mc._alpha -= fIn;
}
//
// Thumbnail loading, masking and scrolling functions
//
function thumbAlign() {
if (alignThumbs == true) {
_global.thumbX = thumbX=boxWidth-2*thumbX;
}
}
function loadThumbnails(trgt, format, dist, prev_x, prev_w) {
path.thumbs.createEmptyMovieClip("thumb"+seed, seed).loadMovie(trgt+seed+format+"?nocache="+getDate(), path.thumbs["thumb"+seed]);
path.thumbs["thumb"+seed]._alpha = 0;
path.thumbs["thumb"+seed]._x = prev_x+prev_w+dist;
}
function scrollMask(maskHeight, thumbX, thumbY) {
path.createEmptyMovieClip("scrollMask", maxSeed+5);
path.thumbs.setMask(path.scrollMask);
path.scrollMask.lineStyle(.25, 0x999999, 100);
path.scrollMask.beginFill(0xFF0000, 40);
path.scrollMask.moveTo(0, 0);
path.scrollMask.lineTo(Stage.width-2*thumbX, 0);
path.scrollMask.lineTo(Stage.width-2*thumbX, maskHeight);
path.scrollMask.lineTo(0, maskHeight);
path.scrollMask.lineTo(0, 0);
path.scrollMask.endFill();
}
function thumbBox(thumbOutline, maskHeight) {
if (thumbOutline == true) {
path.createEmptyMovieClip("thumbBox", 2);
path.thumbBox.lineStyle(.25, 0x999999, 100);
path.thumbBox.moveTo(-2, -2);
path.thumbBox.lineTo(Stage.width-2*thumbX+2, -2);
path.thumbBox.lineTo(Stage.width-2*thumbX+2, maskHeight+2);
path.thumbBox.lineTo(-2, maskHeight+2);
path.thumbBox.lineTo(-2, -2);
}
}
function needArrows(arrowSize, dist, h) {
if (path.scrollMask._width<path.thumbs._width) {
if (runMeOnce != true) {
drawArrows(arrowSize);
placeArrows(arrowSize, dist, h);
runMeOnce == true;
path.arrows.arrowLeft._alpha = path.arrows.arrowRight._alpha=100;
}
path.arrows.arrowLeft.onPress = pAL;
path.arrows.arrowRight.onPress = pAR;
path.arrows.onMouseUp = rA;
path.thumbs.onEnterFrame = scrollDirection;
}
}
function drawArrows(arrowSize) {
path.createEmptyMovieClip("arrows", 3);
path.arrows.createEmptyMovieClip("arrowLeft", 1);
path.arrows.arrowLeft.lineStyle(.25, 0x999999, 100);
path.arrows.arrowLeft.beginFill(0x666666, 40);
path.arrows.arrowLeft.moveTo(0, 0);
path.arrows.arrowLeft.lineTo(0, 3*arrowSize/5);
path.arrows.arrowLeft.lineTo(-arrowSize/2, 3*arrowSize/5);
path.arrows.arrowLeft.lineTo(-arrowSize/2, 4*arrowSize/5);
path.arrows.arrowLeft.lineTo(-arrowSize, 3*arrowSize/10);
path.arrows.arrowLeft.lineTo(-arrowSize/2, -arrowSize/5);
path.arrows.arrowLeft.lineTo(-arrowSize/2, 0);
path.arrows.arrowLeft.lineTo(0, 0);
path.arrows.arrowLeft.endFill();
path.arrows.createEmptyMovieClip("arrowRight", 2);
path.arrows.arrowRight.lineStyle(.25, 0x999999, 100);
path.arrows.arrowRight.beginFill(0x666666, 40);
path.arrows.arrowRight.moveTo(0, 0);
path.arrows.arrowRight.lineTo(arrowSize/2, 0);
path.arrows.arrowRight.lineTo(arrowSize/2, -arrowSize/5);
path.arrows.arrowRight.lineTo(arrowSize, 3*arrowSize/10);
path.arrows.arrowRight.lineTo(arrowSize/2, 4*arrowSize/5);
path.arrows.arrowRight.lineTo(arrowSize/2, 3*arrowSize/5);
path.arrows.arrowRight.lineTo(0, 3*arrowSize/5);
path.arrows.arrowRight.lineTo(0, 0);
path.arrows.arrowRight.endFill();
}
function placeArrows(arrowSize, dist, h) {
if (thumbX+5>arrowSize) {
path.arrows.arrowLeft._x = -1.2*dist-5;
path.arrows.arrowRight._x = Stage.width-2*thumbX+dist+5;
path.arrows.arrowRight._y = path.arrows.arrowLeft._y=arrowSize/5;
} else {
path.arrows.arrowLeft._x = arrowSize+5;
path.arrows.arrowRight._x = 2*arrowSize;
path.arrows.arrowRight._y = path.arrows.arrowLeft._y=-arrowSize-2*h;
}
}
function pAL() {
path.thumbs.thumbsMove = -1;
path.thumbs.thumbsSlowDown=0;
}
function pAR() {
path.thumbs.thumbsMove = 1;
path.thumbs.thumbsSlowDown=0;
}
function rA() {
path.thumbs.thumbsSlowDown=1;
}
function scrollDirection() {
if (path.thumbs.thumbsMove == 1) {
if(runOncei!=true){
path.thumbs.scrollSpeed= scrollSpeed;
runOncei=true;
}
if(path.thumbs.thumbsSlowDown==0){
runOncei=false;
}
path.thumbs._x -= path.thumbs.scrollSpeed;
if (path.thumbs._x<-(path.thumbs._width)+(Stage.width-(2*thumbX))){
path.thumbs._x = -(path.thumbs._width)+(Stage.width-(2*thumbX));
}
} else if (path.thumbs.thumbsMove == -1) {
if(runOncei!=true){
path.thumbs.scrollSpeed= scrollSpeed;
runOncei=true;
}
if(path.thumbs.thumbsSlowDown==0){
runOncei=false;
}
path.thumbs._x += path.thumbs.scrollSpeed
if (path.thumbs._x>-dist) {
path.thumbs._x = -dist;
}
}
if (path.thumbs.thumbsSlowDown==1 && path.thumbs.thumbsMove == 1){
path.thumbs.scrollSpeed=0.85*path.thumbs.scrollSpe ed;
if(path.thumbs.scrollSpeed<=0.05 ){
path.thumbs.thumbsMove=0;
path.thumbs.thumbsSlowDown=0;
runOncei=false;
}
} else if (path.thumbs.thumbsSlowDown==1 && path.thumbs.thumbsMove == -1){
path.thumbs.scrollSpeed=0.85*path.thumbs.scrollSpe ed;
if(path.thumbs.scrollSpeed<=-0.05 ){
path.thumbs.thumbsMove=0;
path.thumbs.thumbsSlowDown=0;
runOncei=false;
}
}
}
function drawBar(w, h, lbH, dist, prev_x, prev_w) {
path.thumbs.createEmptyMovieClip("loadingBarBox"+seed, 2*maxSeed+seed);
path.thumbs["loadingBarBox"+seed]._x = prev_x+prev_w+dist;
path.thumbs["loadingBarBox"+seed].lineStyle(.25, 0x999999, 100);
path.thumbs["loadingBarBox"+seed].moveTo(0, h);
path.thumbs["loadingBarBox"+seed].lineTo(w, h);
path.thumbs["loadingBarBox"+seed].lineTo(w, h-lbH);
path.thumbs["loadingBarBox"+seed].lineTo(0, h-lbH);
path.thumbs["loadingBarBox"+seed].lineTo(0, h);
path.thumbs.createEmptyMovieClip("loadingBar"+seed, maxSeed+seed);
path.thumbs["loadingBar"+seed]._xscale = 0;
path.thumbs["loadingBar"+seed]._x = prev_x+prev_w+dist;
path.thumbs["loadingBar"+seed].lineStyle(.25, 0x999999, 0);
path.thumbs["loadingBar"+seed].beginFill(0x999999, 100);
path.thumbs["loadingBar"+seed].moveTo(0, h);
path.thumbs["loadingBar"+seed].lineTo(w, h);
path.thumbs["loadingBar"+seed].lineTo(w, h-lbH);
path.thumbs["loadingBar"+seed].lineTo(0, h-lbH);
path.thumbs["loadingBar"+seed].lineTo(0, h);
path.thumbs["loadingBar"+seed].endFill();
}
function loadingBarRun(txtStyle) {
path.thumbs.byteL = path.thumbs["thumb"+seed].getBytesLoaded();
path.thumbs["loadingBar"+seed]._xscale = (path.thumbs.byteL/path.thumbs["thumb"+seed].getBytesTotal())*100;
loadingTxt(txtStyle);
path.totalLB._xscale = (seed/maxSeed)*100;
}
function removeBars() {
path.thumbs["loadingBar"+seed].removeMovieClip();
path.thumbs["loadingBarBox"+seed].removeMovieClip();
if (path.totalLB._alpha<0) {
path.totalLB.removeMovieClip();
path.totalLBB.removeMovieClip();
}
}
//
// Thumbnail loading progress functions
//
function howManyNails(txtStyle, jpgLoadTxt, txtXPos, txtYPos, fontName, txtSize, txtClr, bdr, bdrClr, html, bold, italic) {
path.createTextField(jpgLoadTxt, maxSeed, txtXPos, txtYPos, 200, 10);
path[jpgLoadTxt].autosize = true;
path[jpgLoadTxt].html = html;
path[jpgLoadTxt].type = "dynamic";
path[jpgLoadTxt].wordWrap = true;
path[jpgLoadTxt].selectable = false;
textFormat = new TextFormat();
textFormat.font = fontName;
textFormat.size = txtSize;
textFormat.color = "0x"+txtClr;
textFormat.bold = bold;
textFormat.italic = italic;
path[jpgLoadTxt].setNewTextFormat(textFormat);
loadingTxt(txtStyle);
xWidth = path[jpgLoadTxt].textWidth+10;
yHeight = path[jpgLoadTxt].textHeight/2;
path.createEmptyMovieClip("totalLBB", maxSeed+4);
path.totalLBB._x = xWidth;
path.totalLBB._y = txtYPos;
path.totalLBB.lineStyle(.25, 0x999999, 100);
path.totalLBB.moveTo(0, yHeight);
path.totalLBB.lineTo(60, yHeight);
path.totalLBB.lineTo(60, yHeight+(yHeight/2));
path.totalLBB.lineTo(0, yHeight+(yHeight/2));
path.totalLBB.lineTo(0, yHeight);
path.createEmptyMovieClip("totalLB", maxSeed+3);
path.totalLB._x = xWidth;
path.totalLB._y = txtYPos;
path.totalLB.lineStyle(.25, 0x999999, 0);
path.totalLB.beginFill(0x999999, 100);
path.totalLB.moveTo(0, yHeight);
path.totalLB.lineTo(60, yHeight);
path.totalLB.lineTo(60, yHeight+(yHeight/2));
path.totalLB.lineTo(0, yHeight+(yHeight/2));
path.totalLB.lineTo(0, yHeight);
path.totalLB.endFill();
path.totalLB._xscale = 0;
}
function loadingTxt(txtStyle) {
if (txtStyle == 1) {
path[jpgLoadTxt].text = maxSeed-seed+" thumbnails left to load. ";
} else if (txtStyle == 2) {
path[jpgLoadTxt].text = seed+" out of "+maxSeed+" thumbnails have loaded. ";
} else if (txtStyle == 3) {
if (maxSeed<10) {
addSpace = " ";
} else if (maxSeed<100) {
addSpace = " ";
} else if (maxSeed<1000) {
addSpace = " ";
}
path[jpgLoadTxt].text = " "+seed+" / "+maxSeed+addSpace;
} else if (txtStyle == 4) {
path[jpgLoadTxt].text = "There are "+(maxSeed-seed)+" more thumbnails to load. ";
}
}
//
// Main image box, loading, progress, positioning and size control functions
//
function imageBox(boxHeight, imageY, boxCentred) {
path.createEmptyMovieClip("imageStuff", -10);
if (boxCentred == true) {
_global.imageX = imageX=((Stage.width/2)-(boxWidth/2));
}
path.imageStuff.createEmptyMovieClip("imageBox", -10);
path.imageStuff.imageBox._x = -thumbX;
path.imageStuff.imageBox._y = -thumbY;
path.imageStuff.imageBox.lineStyle(.25, 0x999999, 100);
path.imageStuff.imageBox.beginFill(0xffffff, 100);
path.imageStuff.imageBox.moveTo(imageX, imageY);
path.imageStuff.imageBox.lineTo(imageX+boxWidth, imageY);
path.imageStuff.imageBox.lineTo(imageX+boxWidth, imageY+boxHeight);
path.imageStuff.imageBox.lineTo(imageX, imageY+boxHeight);
path.imageStuff.imageBox.lineTo(imageX, imageY);
path.imageStuff.imageBox.endFill();
path.imageStuff.createEmptyMovieClip("image", -9);
path.imageStuff.image._x = -thumbX+imageX;
path.imageStuff.image._y = -thumbY+imageY;
}
function imageLoad() {
path.imageStuff.image._alpha = 0;
path.imageStuff.image.loadMovie(trgtImage+path.iLo adNumber+format+"?nocache="+getDate(), 1);
}
function imageProgressBar() {
barWidth = boxWidth/2;
barHeight = barWidth/30;
if (barHeight<5) {
barHeight = 5;
}
path.imageStuff.createEmptyMovieClip("imageLoadingBarBox", maxSeed+2);
path.imageStuff.imageLoadingBarBox.lineStyle(.25, 0x999999, 100);
path.imageStuff.imageLoadingBarBox.moveTo(0, 0);
path.imageStuff.imageLoadingBarBox.lineTo(barWidth , 0);
path.imageStuff.imageLoadingBarBox.lineTo(barWidth , barHeight);
path.imageStuff.imageLoadingBarBox.lineTo(0, barHeight);
path.imageStuff.imageLoadingBarBox.lineTo(0, 0);
path.imageStuff.createEmptyMovieClip("imageLoadingBar", maxSeed+1);
path.imageStuff.imageLoadingBar.lineStyle(.25, 0x999999, 0);
path.imageStuff.imageLoadingBar.beginFill(0x666666 , 100);
path.imageStuff.imageLoadingBar.moveTo(0, 0);
path.imageStuff.imageLoadingBar.lineTo(barWidth, 0);
path.imageStuff.imageLoadingBar.lineTo(barWidth, barHeight);
path.imageStuff.imageLoadingBar.lineTo(0, barHeight);
path.imageStuff.imageLoadingBar.lineTo(0, 0);
path.imageStuff.imageLoadingBar.endFill();
path.imageStuff.imageLoadingBar._xscale = 0;
path.imageStuff.imageLoadingBarBox._x = path.imageStuff.imageLoadingBar._x=-thumbX+imageX+boxWidth/4;
path.imageStuff.imageLoadingBarBox._y = path.imageStuff.imageLoadingBar._y=-thumbY+imageY+(2*path.imageStuff.imageBox._height/3);
}
function imageProgressBarRun() {
path.imageStuff.imageLoadingBar._xscale = (path.imageStuff.image.getBytesLoaded()/path.imageStuff.image.getBytesTotal())*100;
}
function removeImageBar() {
if (path.imageStuff.imageLoadingBar._xscale>=100) {
path.imageStuff.imageLoadingBar.removeMovieClip();
path.imageStuff.imageLoadingBarBox.removeMovieClip ();
}
}
function imageCentre() {
if (imageCentred == true && path.imageStuff.image._width>0) {
if (r1 != true) {
pIX = path.imageStuff.image._x;
pIY = path.imageStuff.image._y;
r1 = true;
}
path.imageStuff.image._x = pIX+(path.imageStuff.imageBox._width-path.imageStuff.image._width)/2;
path.imageStuff.image._y = pIY+(path.imageStuff.imageBox._height-path.imageStuff.image._height)/2;
}
}
function imageSquash() {
if (path.imageStuff.image._width>path.imageStuff.imageBox._width && path.imageStuff.image._height<path.imageStuff.imageBox._height && path.imageStuff.image._width>0) {
path.imageStuff.image._xscale = (path.imageStuff.imageBox._width/path.imageStuff.image._width)*100;
path.imageStuff.image._yscale = path.imageStuff.image._xscale;
} else if (path.imageStuff.image._height>path.imageStuff.imageBox._height && path.imageStuff.image._width<path.imageStuff.imageBox._width && path.imageStuff.image._width>0) {
path.imageStuff.image._yscale = (path.imageStuff.imageBox._height/path.imageStuff.image._height)*100;
path.imageStuff.image._xscale = path.imageStuff.image._yscale;
} else if (path.imageStuff.image._height>path.imageStuff.imageBox._height && path.imageStuff.image._width>path.imageStuff.imageBox._width && path.imageStuff.image._width>0) {
xS = (path.imageStuff.imageBox._width/path.imageStuff.image._width)*100;
yS = (path.imageStuff.imageBox._height/path.imageStuff.image._height)*100;
if (xS<yS) {
path.imageStuff.image._xscale = path.imageStuff.image._yscale=xS;
} else if (xS>yS) {
path.imageStuff.image._xscale = path.imageStuff.image._yscale=yS;
}
}
}
function squashReset() {
path.imageStuff.image._xscale = path.imageStuff.image._yscale=100;
}
//
// Image selection functions
//
function Release() {
if (path.iLoadNumber != this.iNumber) {
this.b = true;
path.iLoadNumber = this.iNumber;
squashReset();
imageLoad();
imageProgressBar();
}
}
function ReleaseOutside() {
this.b = false;
}
function EnterFrame() {
if (this.runOnce != true) {
this.iNumber = seed;
this.runOnce = true;
}
if (this.b == true) {
this.blink();
}
}
MovieClip.prototype.blink = function() {
(this.blinkTimer == null) ? this.blinkTimer=getTimer()+40 : null;
if (getTimer()>=this.blinkTimer) {
this.times += 0.5;
if (this.times == .5 || this.times == 1.5) {
this._alpha = 30;
} else if (this.times == 1 || this.times == 2) {
this._alpha = 100;
}
this.blinkTimer = null;
}
if (this.times>=2) {
this._alpha = 100;
this.blinkTimer = null;
this.b = false;
this.times = 0;
}
};
//
//
//usage
//
//
_root.createEmptyMovieClip("empty", 1);
photoGallery(_root.empty/*path*/, "thumbnails/DCP_"/*target*/, 1/*seed*/, 15/*maxSeed*/, ".jpg"/*format*/, 10/*fIn*/, 254/*thumbX*/, Stage.height-100/*thumbY*/, false/*thumbOutline*/, 80/*maskHeight*/, 15/*arrowSize*/, 10/*scrollSpeed*/, 50/*w*/, 10/*h*/, 3/*lBh*/, 5/*dist*/, jpgCount/*jpgLoadTxt*/, 0/*txtXPos*/, -20/*txtYPos*/, 2/*txtStyle*/, "Arial"/*fontName*/, 11/*txtSize*/, 999999/*txtClr*/, false/*html*/, false/*bold*/, false/*italic*/, 300/*boxWidth*/, 300/*boxHeight*/, 0/*imageX*/, 50/*imageY*/, true/*boxCentred*/, true/*imageCentred*/, "images/DCP_"/*trgtImage*/);
//
//
//
// This prototype assumes that the thumbnails and images are labeled in a consecutive order
// for example, the thumbnails go th_1, th_2, th_3 etc and the corresponding pictures have to
// go im_1, im_2, im_3 etc etc.
//
// Explaination of variables below:
// path is the target path to the empty mc that the gallery will load into.
// trgt is the directory to the thumbnails including the name beginner (ie thumbnails/DCP_45, the trgt = thumbnails/DCP_)
// seed is the begining thumnail that you want to load.
// maxSeed is the final image in the series, or the final image that you want loaded in.
// format is either ".jpg" or ".png" depending on the type of file you are using.
// fIn is the fading in and out rate of the thumbails and other stuff.
// thumbX is the starting x position of the thumbnails.
// thumbY is the starting y position of the thumbnails.
// thumbOutline is either true or false depending on if you want a border around the thumbnail scroller.
// maskHeight is the height of the mask that hides the other thumbs in the scroller.
// arrowSize is the size of the arrows in the scroller.
// scrollSpeed is the rate in which you can scroll through the thumbs.
// w is the width of the thumbnail loading bar.
// h is the y position of the thumbnail loading bar.
// lbH is the height of the thumbnail loading bar.
// dist is the distance apart you want the thumnails from each other.
// jpgLoadTxt is what you want to name the created txt box ( in " " ) to see how many thumbs are left to load.
// txtXPos is the x position of the how many left to load txt box.
// txtYPos is the y position of the how many left to load txt box.
// txtStyle is the syle in which you will count down the loading thumbnails ( 1,2,3,4 ) .
// // // 1 = 241 thumbnails left to load.
// // // 2 = 9 out of 250 thumbnails have loaded.
// // // 3 = 9 / 250
// // // 4 = There are 241 more thumnails left to load.
// fontName is the name of the system font you want to use for the how many left to load txt box ( ie "Arial").
// txtSize is the size of the font for the how many left to load txt box.
// txtClr is the text colour of the how many left to load txt box ( in hex form, ie for white FFFFFF ).
// html is true or false depending if you want the html format switched on or of for the how many left to load txt box.
// bold is true or false for the how many left to load txt box.
// italic is true or false for the how many left to load txt box.
// boxWidth is the width of the image box.
// boxHeight is the height of the image box.
// imageX is the x position of the image box.
// imageY is the y position of the image box.
// boxCentred is true or false depending on if you want the image box centred to the stage along the x-axis. If true, it overides imageX but not imageY.
// imageCentred is true or false depending if you want to centre the loaded photo to the middle of the image box.
// trgtImage is the target directory that you images are stored in including the name beginner (ie images/DCP_45, the trgtImage = images/DCP_)
//
// That's about all i can be arsed to explain. It is a long code and it is my first major piece of programming so although I think it's top notch
// I'm sure it could be narrowed down somewhat. If you have any additions or changes to the script please post them, it'll be great feedback
// for me.
//
// ta ta
// buggedcom
// (aka OliverLillie)
//
enjoy it if you use it, it took a lot of blood sweat and tears :D :D :D ;) ;) ;) :) :) :cool:
MixMatch
09-11-2002, 06:05 AM
It would be nice to see all those functions as children of the photoGallery class. That would free the function names from the root level and create a cleaner object tree...
Billy T
09-11-2002, 09:35 AM
yep that's pretty damn huge
your example works well
a downloadable fla would be handy
btw you can comment multiple lines with
/*
comment
comment
*/
saves you having to // every line
good work
fishlungs
09-11-2002, 11:07 PM
wow! impressive... i bet alot of coffee was drunk over those five days.
would you post the .fla, like Billy T has suggested.
brilliant piece of work!
buggedcom
09-12-2002, 02:41 AM
To post the fla would be usless as it contains nothing but the code above. Everything is created dynamically and the jpegs are pulled in. All you have to do is copy the code into the first frame of a new flash movie. Set up an image folder and thumbnail folder with appropriate files. then change the variables as described in the code, publish and volia.
I'm busy turning this into a component with, additional features such as image rotation, colour controlls, better placing control over placement, etc, etc. If i'm feeling generous i will then post the component fla, but that is only if i don't think I want to keep it to myself, especially as at least two weeks work will have gone into it.
Feel free to use this code though.:D
Rupert
09-12-2002, 04:04 AM
good work champ!
Thanks for sharing it with us.
fishlungs
09-12-2002, 08:45 AM
Thanks dude! I think I'll have some fun with it today.
Good luck with your component project, I hope it goes well!
:D
spazmaster
09-12-2002, 11:18 AM
whoa talking about being generous. you have my gratitude!
spazmaster
09-12-2002, 11:40 AM
i don't know if you will bother answering my questions ;) but i'll try anyway!
why doesnt the loading of thumnails/images work?
your code sticks the "?nocache=" to the jpg filenames and it gives an error.
if i delete the ?nochache= it will load my jpgs but only 1 thumbnail, and wont load images.
any help/thoughts would be appreciated!
MixMatch
09-13-2002, 12:50 AM
everything after the ? has no effect on the loading of files, it just specifies variables to be sent to the file... In this case that prevents them from getting stuck in cache...
buggedcom
09-13-2002, 02:28 AM
this part is for making sure the images don't get stuck in the browser cache. Try viewing it in a html file instead of just the flsah player.
If you want the gallery to work in the stand alone player then do remove
?=noCache but also be sure to remove the +getDate aswell.
to make
loadMovie(trgt+seed+format+"?nocache="+getDate(), path.thumbs["thumb"+seed])
into
loadMovie(trgt+seed+format, path.thumbs["thumb"+seed])
try this, it should work
buggedcom
09-13-2002, 05:53 AM
for all of you who want it, here is the basic component (a ziped fla file). As yet all but the thumbnail blinking and the control over the thumbnail scrollbar end position are not yet done, but i thought i might aswell upload the nearly finished version for you all before the weekend. I will get around to updating it on Monday.
I'm taking a break, going to da beach for a little r'n'r.
Enjoy.
spazmaster
09-13-2002, 07:34 AM
hey Mix, yeah i did remove getDate as well - but when u remove that i can only get one thumbnail to work.
anyways, bugged, thx for sharing again, i really like your work!
(btw my grandma has a summerhouse in coffs harbour hehe...)
fishlungs
09-13-2002, 08:33 AM
Something I found out that might be useful when troubleshooting.
When I was exporting my .jpg files, in Fireworks, if I checked 'progressive' they won't show. As soon as I re-exported my .jpgs and unchecked 'progressive', they loaded fine.
Thanks for posting the .zip above :) I'm going to have a peek at it now :cool:
spazmaster
09-13-2002, 08:55 AM
yeah macromedia had a sample like this one once and u couldnt use progressive jpg's in that one too.
anyways i'm getting problems with the thumbnail scroller. the right arrow positions itself at the end of combined width of al the thumbnails. (usually out of sight)
depending on how you set the x pos for the thumbs you will maybe see 2-5 thumbnails, but never all of them.
i tried changing every setting, but somehow the scrollbar isnt working. i'm using 8 pictures.
all the thumbnails and images load fine btw. i'm really liking this component. now just the thumb scrollbar :)
fishlungs
09-13-2002, 01:37 PM
yeah!
i'm liking this component mucho too :)
other problems i encountered were...
1. the movie size has to be a certain size, like 800x600 or 800x500. when i change the movie width or height it would reposition the scrolly thing.
2. you have to object/embed it into html or the scroller seems to go a bit mad.
maybe i've done something wrong, i dunno... but that's the things i've noticed.
i do love this component though :D
let's hope the creator feeds us some more!!!
here's what i've done with it so far:
http://www.fishlungs.com/pat2/
buggedcom
09-16-2002, 11:16 AM
I have a question, would it be better if i created a macromedia extension manager file for it? if so, how would i accomplish this?
the new version of the component does solve all these problems that people have been describing. The important thing to remember is that with the code, only one gallery can be implemented on the stage due to the _global variables (which were a work around due to several problems i was having with assigning the onPress commands to the thumbnails). The component allows you to install more than one gallery at a time.
// recent updates to the component / code
1. the length of the thumbnail scrollbar is now independant of the stage width, meaning you can set the length of the bar and the starting point, so you can control the overall placement.
2. all of the colour and alpha settings of the dynamically drawn items are now accesible via the component parametres panel and can be changed to suit your design.
3. there is a setting now for implementing '?=noCache' so you can test it in the flash player rather than having to fully publish the fla or so you can keep the images cached if you so wish.
4. there are now rollover states for the arrow buttons.
5. the thumbnail blinking has been implemented/corrected to work in the component, whether or not it works efficiently or not is not known becaus it has not yet been tested online, although it does produce the same offline results as the original code
6. there is now an option where you can choose to squash (not enlarge) the thumbnails to the mask height. this is good for having any portrait thumbs that you want to be the same size as the other landscape thumbs.
7. there are now four different placement settings for the arrows.... 'either' (one at either end), 'left' (both on the left hand side), 'right' (both on the right hand side), or 'custom' (where you can choose your own placement co-ordinates. The arrows also now are automatically positioned so that they sit in in the middle of the mask height.
// expressed problems in other posts
the fla doesn't work!
try, as suggested above opening it through file, open. if not email me or post your email and i will send you a zipped copy that should work. It works for me.
Error opening URL "file:///C|/thumbnails/AO_1.jpg?nocache="
In the code there is a small piece of script which doesn't allow the jpgs to get sucked into the browser cache. '+"?nocache="+getDate()' (note the best way to do this is actually +getTime() because it creates an individual timestamp on each image, but the likely hood of the images changing in one day is not high so this is also good as it will keep the images in the cache for 1 day. To stop the error from happening in the flash player remove the tag from the script from the script (it occurs twice)
fine in normal, not in expert - the prototype code not the component
this is because at the end of the script in the usage after each variable i have added the variable name surrounded in /*var name*/ to comment it. This isn't incorrect usage and doesn't affect the code yet flash still refers this as an invisible error. to stop it get rid of the comments
I think that covers it for now. Once you all test the new component. Let me know about any suggestions or other features or heaven forbid bugs that have occured to you.
fishlungs
09-16-2002, 11:37 AM
those fixes sound good. i've downloaded your new file... that'll keep me busy today :) cheers... will let you know how i get on.
buggedcom
09-16-2002, 11:50 AM
..it's a good feeling, it makes me feel all warm and gooey inside. cough, cough. I'll be posting more tomorrow, your night i pressume. it'll be nice to see anyadvances you make. or any suggestions. I had thought about putting in a rotate image buttton or perhaps flip image?
spaz. sadly for your grandmother i'll be leaving coffs harbour soon and going back to grey old blighty, staright back into college, after six months of relaxing and seeing the girlfriend. It will not be a nice experience.
spazmaster
09-16-2002, 01:31 PM
heheh. well bugged thanx again for working and prefecting your code. really nice work.
one of the things i see as a limitation to your code is that its not completely dynamic. if somehow your code could recognize how many pictures would be loaded, instead of having to assign the total number of pictures beforehand.
maybe an easy solution would be to be able to fill in a variable instead of a number in the component. then use LoadVars in the timeline to load in the variable from a text file. that variable would be a number you fill in in your "numberofpictures.txt"
now you could add pictures to the gallery without having to change the swf file. all you have to do is ftp pictures and update the number in the text file.
can components read variables from the timeline or no?
buggedcom
09-17-2002, 12:04 AM
one of the things i see as a limitation to your code is that its not completely dynamic. if somehow your code could recognize how many pictures would be loaded, instead of having to assign the total number of pictures beforehand.
this is true. although i was going to implement a possible php connection to determine how many pic where in the folder, or xml, i feel that to do this and then post the result would be too much free code to give away. Although you can take the component as it is and use it/ adapt it i don't know if i will update any other serious changes to the code. It is true you could change the component to read how many jpegs there are in a folder from a txt file. This is a simple procedure, but i will provide an option for this in the next minor update. If you loaded vars, you wouldn't nessecerily(? i can never spell that word) have to load them off the root timeline you could load them directly into the component, although it could read them of the root if you so wished.
DominumBelli
09-17-2002, 03:19 AM
I've noticed that the last thumbnail doesn't get resized...is this occuring with everyone?
BTW Bugged, I'm *attempting* to work the code so that it will display it's list from an array of URLs, so that anyone could just build the array in the main timeline, and the component detects the number of items in the array and loads the appropriate URLs/files in the array. Pretty much like you were talking about in your last post.
buggedcom
09-17-2002, 09:07 AM
3rd update.
updated material includes
two types of scrolling now available, vertical and horizontal.
added hidden square mc's behind the arrows to give more definition to them.
fixed thumbsquash on the last image.
added more control over the thumbnail preload bar, pos, size etc.
added more control over the thumbnail total preload bar
added slow down rate of scrolling control, as well as on and off options.
adde on and off options for the total thumbs to load bar and text.
more stuff later
DominumBelli
09-17-2002, 10:15 AM
awesome work mate :)
Heres a new challenge for you :) You've just made the vertical scrolling, which shows one line of thumbnails at a time......how about something that can show multiple lines?? :)
Also noticed with the vertical scrolling, if you scroll up and down while the thumbnails are still loading, the up arrow gets stuck looking like the mouseover frame. The actions still work fine, but when you have the mouse off it, it still looks like mousedown. (hope that made sense)
Kickass work though :) Also, I worked out how to alter the code to make it images from an array. If anyone's interested, I'll post the code you need to change.
fishlungs
09-17-2002, 10:41 AM
wow! a new day and a new version of the photo gallery component :)
dude! you are working like a pit-pony!
DominumBelli, i'm interested in the code you need to change to make it images from an array.
i'm off to play with the latest version of this masterpiece
:cool:
spazmaster
09-17-2002, 12:09 PM
post the code dominum dude ;)
DominumBelli
09-17-2002, 04:08 PM
okay, here goes. Hope ya'll understand my explanation :)
in the:
photoGallery.prototype.onLoad = function()
insert this:
this.maxseed = _root.displayarray.length;
purpose: obviously to reset the number of photos to be displayed to the number of items in your array (in this case, _root.displayarray)
in the:
photoGallery.prototype.loadThumbnails = function()
and:
photoGallery.prototype.imageLoad = function()
change the two loadmovie bits from:
loadMovie(this.trgt+this.seed+"."+this.format)
to:
loadMovie(_root.displayarray[(this.seed-1)])
hopefully this makes sense, all we're doing is resetting the number of thumbnails we want to display, and changing the .jpgs that are being loaded by loadMovie to data stored in positions in the array.
Obviously, _root.displayarray needs to have the locations of the .jpgs within it, starting from _root.displayarray[0] and going upwards from there.
Let me know if you have any problem with things, and I'll try and clear things up if possible :)
Good Luck!
boyzdynasty
09-17-2002, 05:50 PM
wow.... i am a newbie and the code is amazin'
great work.
This will keep me up a few nites tryin' to figure it out.
but I'll try and run it.
I check out the sites that was posted using the code.
They look great!!
*I wish I can be that creative*
:D
buggedcom
09-17-2002, 10:45 PM
Also noticed with the vertical scrolling, if you scroll up and down while the thumbnails are still loading, the up arrow gets stuck looking like the mouseover frame. The actions still work fine, but when you have the mouse off it, it still looks like mousedown. (hope that made sense)
Yes i was aware of this. I think mx has a bug with the onPress, onRollOver commands etc because it is exactly the same code on the arrows when they are in the horizontal scrolling positions. What the ....? Anyway i'll try to fix or work around it. There is also sometimes a sticky patch in the vertical scroll. I find that when i scroll into the last line of thumbs it sticks.
Thanks for the array patch. I'll see if i can work that into the component so you can specify if you want to read an array, or txt file and where from.
spazmaster
09-18-2002, 11:50 AM
that would be great :D
buggedcom
09-19-2002, 08:05 AM
ok here it is v6
updates include
1. There is now the option to see more than one layer of thumnails in the vertical scrolling option. What it does is squashes thumbnails into a specified no. of lines in the same space of the mask height that normally 1 thumbnail fits into. You can specify an unlimited no. of lines, but the thumbs might get rather small if you do not increase the mask height. (DominumBelli this ones for you as you challeneged me, and i provided)
2. The vertical scrolling, arrow roll over states have been fixed (at least i think so. I didn't change the code, they just started working properly all of a sudden)
3. Due to a request on this post in flashkit i have also added a feature that reverses the loading prosses. for example if the maxSeed was twenty and the seed was 5 instead of loading thumb 5 first then 6, 7, 8 etc you now have the option to set it in reverse to go 20, 19, 18, 17 etc etc down to 5. This means that if you are using the component to display new pictures it can be set so the newest pictures are displayed first. This is most usefull with the next point and in the coming updates, as i am working on a php solution (contrary to what i said before, i thought i'd keep this in the public domain as it feels good to share) so that means no more manually updating the fla when installing more pics.
4. In conjunction with the above change, and several requests from the posts I have given you the option to load the trgt variables from a txt file. For the moment it is a static txt file named 'galleryData.txt' (included in the zip below) but i will change it so you can create variables from the root to update the component with new txt file's names or directory locations. Please be aware that if you change the setting to txt from component any of the component data involving the thumbs / images / seed data becomes overwritten (it might be obvious i know but i thought i'd tell you anyway)
You may notice that there is also an option to grab the data from an array but this is not yet finished, will be shortly in time for the next update
5. A small thing, but you can now specify how far apart the arrows are verticaly from one another in the left and right settings.
I think that's it. Just to let you know, when this beast has finally finished i will provide a very detailed description / instruction list on all the features of the gallery. most probably a .doc file, but i'll post a txt file as well for those of you on a mac and without the overpriced microsoft program.
let me know again if you spot any bugs, or if you can think of anything else to add. For the next update i will also be implementing a zoom feature that will work on any image that has been squashed in the image box. To ensure picture quality it will only zoom to _xscale = 100, so if you want this to work, make the images much larger than the imagebox size.
:cool:
DominumBelli
09-19-2002, 09:50 AM
Originally posted by buggedcom
1. There is now the option to see more than one layer of thumnails in the vertical scrolling option. What it does is squashes thumbnails into a specified no. of lines in the same space of the mask height that normally 1 thumbnail fits into. You can specify an unlimited no. of lines, but the thumbs might get rather small if you do not increase the mask height. (DominumBelli this ones for you as you challeneged me, and i provided)
:cool:
Enjoyed the challenge eh? :) I'll have to think of another one over the weekend.....heading up to Sydney on business.....so hopefully by the time I'm back, I'll have devised a new way to get your brain ticking :)
Awesome work so far :) I'm very impressed with the effort that you've put into this one project......I don't know if you'd be interested in some possible contract work, but if you are, please email me on clau@optusnet.com.au so I've got your email, and I might be able to send some work your way.
spazmaster
09-19-2002, 10:09 AM
hehe, see there you go! according to the universal law of sowing and reaping, you have sowed and will start to reap very shortly!!!
anyways i'll keep cheering you on bugged, thx for the updates! :)
okay i check it:
first response: wow this is looking better everytime.
however how do i specify the directry info as coming for the etxt file?
whats stated now is: "component, arr..." i can see arr will be array, but how do i specify the info coming from a textfile?
i changed the info in the textfile, but it still is getting its infor from the component. i tried txt, text file, textfile but its still getting its info from the component.
cheers
fishlungs
09-19-2002, 10:55 AM
wow dude!
version 6 already... didn't get time yesterday to play with version 3, bah!
brilliant stuff, good to see that you may be 'reaping' from this venture too. :D
hope i get time to play with this latest version today. pff gotta go shopping and by curtain rail hoops or something, and a lock for the bathroom door.... mundane. heh!
farafiro
09-19-2002, 11:05 AM
Hey bug
u didn't answer flashguru here
http://www.were-here.com/forums/showthread.php?threadid=158634
buggedcom
09-19-2002, 03:35 PM
farafiro I answered flashguru's post on flashkit, it was the same as the one on were here. I've got so many post running on this i find it hard to keep track.
spazmaster To select txt, just change the setting to... txt ...That works for me. How about anyone else? Maybe i zipped a slightly earlier version of the code than the one i prepared, but i don't think i did. There's no way it can still grab the dirInfo from the component if it is set to txt. So :confused: :confused: ...????
fishlungs shopping huh? i got dragged round the shops by my girlfriend the other day, even though i didn't want to, but i was trying to keep her from getting moody. I tried on a shirt i really liked she said i looked like **** in it, i got pissed off, she got pissed off the i got pissed of and the whole viscious circled continued for the next couple of hours. Shopping is a dangerous business. Bye the bye, how's the weather in blighty, as i'll be back from Aus in a week and a half?
dominumBelli I'm looking forward to the new challenge although if you keep tossing them up i'll never be able to complete the zoom, colour tinting, and rotate/flip features, plus the already suggested picture caption. Thanks for the offer of passing and freelance work my way, i would definetley be interested, although i'm not going to be in australia for that much longer, a week and a half to be precise, so if this work can be done via the internet then bring it on. I'll send you an email tomorrow anyway just so you have my email as you say.
I've been informed / found out that my server that the preview of the gallery was hosted on just ran out of bandwidth, 512mb in 6 days!!!!! and the preview was all that was on there. I've signed another account up and the preview can be found at
http://buggedcom2.50megs.com/photoGallery_7i.html
although give me a few mins to set it up properly.
later
buggedcom:D
fishlungs
09-19-2002, 04:15 PM
lol at bandwidth running out!
hehe, got out of shopping for whole afternoon, but i'm gonna have to get them damn locks later at b&q!
the weather's been ok lately, it's cooling down now though... it will be baltic by the time you arrive i guess ;)
yup, shopping is very dangerous... the amount of times my gf and i have kicked off... rofl, i usually walk away threatening to go home on the next bus if it gets too out of hand... i like to get what i need and go home, all that window shopping gets on my tits!
by the way, the latest version of your photogallery is very impressive. i was oohing and aahing at it just a couple of hours ago.
i shall contact the queen about your impending arrival so you get a royal welcome to blighty, with corgis and morris dancers and stuff :D
buggedcom
09-20-2002, 01:47 AM
i shall contact the queen about your impending arrival so you get a royal welcome to blighty, with corgis and morris dancers and stuff
lol, well i'll look forward to the meeting the old woman. Maybe they'll declare the day a national holiday aswell!!!;)
fishlungs
09-20-2002, 09:37 AM
http://www.tripod.lycos.co.uk/
you know how you mentioned a php thingy earlier... well, the above link takes you to a site that does PHP4 and MySQL hosting for free.
there's an advert (which fades out after a few seconds) as you'd expect. i just signed up for an account last night 'cos i want to learn how to do PHP and MySQL stuff.
make sure you arrive on a monday by the way! a national holiday at a weekend would be disasterous... unless of course they roll it forward.
buggedcom
09-23-2002, 01:48 AM
grrrr....
tripod will not let me sign up, invalid security code even though it's the same damn one as i put in. buggeration.
I have completed a captions option(both array, file name and txt file options for the source), completed the array dirInfo option as well as fixing a bug in the txt file one. Still can't sort out the php one yet as i can't get into goddamn tripod.
I will post my last update for about two weeks on wednesday, as when i am gonna spend my last few days in aus with my girlfriend without my laptop (shock:eek:), then when i arrive back in england i will need time to settle back in to life in london, ie find a place to live, register at college etc etc. So if anybody has any new and fresh ideas add them now before the long break.
boyzdynasty
09-23-2002, 02:25 AM
bug... ur a student?
Just curious, how old r u?
buggedcom
09-23-2002, 03:13 AM
... yeah. I'm a design student by nature, progressing programmer by night.
The college i inhabit, (when i get back to blighty and then only one day of lectures a week) is the London College of Printing, which is part of the London Institute, in erm, London.
I was born in the year of the monkey a score and two years ago. 22, born on the first of march 1980 at 6:30 in the evening.
buggedcom
09-23-2002, 03:52 AM
you know how you mentioned a php thingy earlier... well, the above link takes you to a site that does PHP4 and MySQL hosting for free.
there's an advert (which fades out after a few seconds) as you'd expect. i just signed up for an account last night 'cos i want to learn how to do PHP and MySQL stuff.
fishlungs I just read a reply to an article i posted on were here about testing php files. Are you aware, as i now am that you can test php (and mySQL, i think) on your computer by installing them. I'm running a mac on OS X 10.1.3 and have installed php 4.1.1 into my system and can now test the php files. It saves time and money uploading and downloading. here is a great package that i used
http://www.entropy.ch/software/macosx/php/
but if you are running something else go to the link below.
http://www.php.net/downloads.php
it contains installers for the windows environment and on the left links to other severs that contain other installers for other platforms. Really worth a check out. The php solution for the component will be winging it's way here soon.
later
fishlungs
09-23-2002, 11:07 AM
thanks for the links. downloading now... i was looking for ages the other day for a download link, on that very site!!! :cool:
boyzdynasty
09-23-2002, 11:22 AM
[i]I was born in the year of the monkey a score and two years ago. 22, born on the first of march 1980 at 6:30 in the evening. [/B]
I, too, was born in the year of the monkey. But turning 22 in Nov.
:D
I was just curious about your age....when you said you were a student.
I, too, am a student.
I'm actually a programmer during the weekends and an Accountant during the week.
*hehe*
Well....at least I try to be.
But I hope to graduate in a year or so...... :confused:
buggedcom
09-24-2002, 08:58 AM
ok nearly drained of all my energy now. Php is up and running. zoom function working.
PHP Usage notes
When the php file reads the file names, it reads them from the image directory, and it also reads them like so...
image_1,image_10,image_11,image_12,image_13,image_ 2,image_3,image_4,image_5,image_6,image_7,image_8, image_9
so to combat this and to get it to display the files in order name your files with zeros
ie image_01,image_02,image_03,image_04,image_05,image _06,image_07,image_08,image_09,image_10,image_11,i mage_12,image_13 ..etc
also if your images go into the 100's you have to add 00 to get them to arrange correctly.
ie image_001,image_002,image_003,image_004,image_005, image_006,image_007,image_008,image_009,image_010, image_011,image_012,image_013...etc
then if it's thousands add 000, etc etc
There probably is a way to edit the php to get it to display them correctly without doing this but I am not that great at php, so if anyone wants to help it would be apprciated.
Array usage
There are two arrays that the component now reads from if you are using the array method for directory info. one is where the thumbnails are located, the other is for the images locations. If you don't put the matching images and thumbnail sets in each of the appropriate arrays you will get a mix match, obvious really
Caption notes
You can now add captions to your images. the component will either read an array from a txt file, read the file name, read an array from the component(and thus anywhere from the _root) or it will display none at all.
zoom notes
The zoom is in various stages of completion, the zoom function works only when the image you are importing is shrunk below 95 of the xscale or yscale. It will only zoom up to the 100 of either scale so to stop image degridation. I will add a setting to allow your discression of max scale sizing and low scale sizing. Once zoomed in you will be able to move the image around but not yet...TBA
Thats it for now me thinks. Last post tomorrow for two weeks
buggedom
fishlungs
09-24-2002, 10:32 AM
dude! excellent work.
it's amazing how much your work has evolved since the origninal post.
i'm a total noob at php so i can't help you with that... not even sure if i've installed it properly on my comp! hehehe.
i'm going to have to invest in a decent book on the subject.
hope you have a nice break and are able to relax from all this intense work!
the queen and family, prince charles in particular, are very excited about your return to blighty. they're going to give you a room at the palace, i hope that's not too far from the college of printing ;)
no doubt they will provide a chauffer anyway.
chocs away old chap!
i live in the south by the sea about an hour or so away on the train... might see you around ;) it's a small country.
buggedcom
09-25-2002, 11:17 AM
thanks for all the kind comments and input that everyone has given, this is i signing off for a week or two. untill then i bid you adew.
ps. i will post one more final update when i return that includes an instructional doc file, aswell as several addtions. My god i need a break my eyes are suffering.
fishlungs, i look forward to the limo on arrival but i have a feeling my mother would like to pick me up from the airport, i have after all not seen her in six months. The room at the palace sounds great but since old harry has given up the drugs and the booze i don't think it really sounds that good anymore, thanks all the same.
boyz, we will be finishing our courses at around the same time, what do you know...?!!
aurevoire.....:)
last update (fixes very few things not even really worth downloading, but if your an addict and need you fix go ahead) for a while.
boyzdynasty
09-26-2002, 12:18 AM
since bugg....is on a leave of absence....
does anyone know how I can execute an action when someone clicks on one of the thumb nails....??
for example:
if thumb_1 was clicked....I will display an MC about that pix that will load onto the imageBox
I guess the problem is....how do I know if thumb_1 is clicked?
farafiro
09-26-2002, 06:09 AM
//MX
//on the _root
_root.thumb1.onRelease = function(){
//your code here
}
//************************
//Flash 5
//on thumb1 movieclip
onClipEvent(mouseDown){
if(this.hitTest(_root._xmouse,_root._ymouse,true){
//your code here
}
}
black
09-26-2002, 09:52 AM
my God ! Do you think it is much fun using comments to write compositions ? :p
farafiro
09-26-2002, 10:03 AM
:o comments are the GUARD ANGELS:o
boyzdynasty
09-26-2002, 08:14 PM
Originally posted by farafiro
//MX
//on the _root
_root.thumb1.onRelease = function()
I get that but.... i dunno what he used to identify the thumbs....
i dunno how a component really works....but i do know you fill in the parameters for the method/class/function ... wateva it is called in flash....
:(
Did you take a look at the component....?
I know which argument to specify the pix location but where is he loading it too.... so I can excess it.....
I was wondering if I can view the codes of component.... or is a component like a compiled prog. (ex: *.exe)
So that means you can't look at it.... unless you got the source code
:(
but thanx for helpin'.....
o... Comments are good. It is good programmin' practice!!
:D
spazmaster
09-27-2002, 07:56 AM
just go into the library and double click on his components....you will see normal stages with timelines with actionscript...check it out there :)
DominumBelli
09-27-2002, 11:21 AM
slightly confused with using the array value in this component.....where do I put in the value of the array to be used?? The component parameters seem to require you to manually put in the .jpgs you wish to load......???
maybe I'm just misunderstanding it....
anyway, I've got a coldfusion script I've written to populate an array with data......can anyone point me in the direction of how to use this new array I've created in the component? :)
thanks :)
boyzdynasty
09-27-2002, 12:14 PM
thanx spaz.... i'll do it when i get some time in next weekend
*school work....is killin' me*
DominumBelli ... I have no clue about CF ....
:(
DawnUnder
09-29-2002, 09:10 AM
Is there a way to assign an action to the image in the imagebox after clicking on the thumbnail.? I would like to show the image and add the action to it so anyone would be able to download that image. I have been testing some stuff but all I get done is that locally it opens the windows explorer and shows me the directory where the image resides.
Please a helping hand!
DominumBelli
09-30-2002, 04:14 AM
Hey guys.
I've got the component to use my own arrays by inserting these two lines into the photoGallery.prototype.onLoad function:
photoGallery.prototype.onLoad = function() {
//forceset arrays
this.dirInfoArray = _root.imagearray;
this.dirInfoImageArray = _root.imagearray;
the _root.imagearray that I'm using is made up of a mixture of images both in the same folder as the .fla, and a bunch of http://www.blah.com/blah.jpg locations.
I've found something very interesting. Clicking on the thumbnails for the local files works fine. For every second thumbnail clicked that holds a http:// location, the image fails to load.
Anyone have any idea on how to fix this??
wiseganesha
09-30-2002, 09:10 AM
Is there any chance I can use the loadmovie with a transparent png? And if not, what about loading two jpgs, one as a bw alpha matte?
e-mike
09-30-2002, 12:50 PM
Hey dude, seems like you exceded your bandwidth.
Hope you fix it. I would like to see your example.
buggedcom
10-02-2002, 09:31 AM
I am now back in the UK and i see there are lot of questions to answer.....
boyz... I will be adding a script where you can set an option to perform an action on press of the thumbnail. Also i'm not infront of flash at the moment but when i do get infont of it i will show you where to add your code to the component to get it on to the onPress command of the thumbnails.
Dominum... Hey i got your email and i am now back in the UK, unfortunetly the day i arrived brought the crappiest weather they have had for the past one and a half months. Well at least they can't blame me for brining the weather over this time.
As far as i know flash has an in built system designed so you can't steal other peoples work. I think that it will not load the other jpegs using the http:// location because it will not allow you to load stuff from other domains other than the one it is situated in. If i am mistaken someone please correct me.
Also about adding
//forceset arrays
this.dirInfoArray = _root.imagearray;
this.dirInfoImageArray = _root.imagearray;
you can ( i think, i haven't tried ) change the components dirInfoArray and dirInfoImageArray by just refering to them as _root.comonentName.dirInfoArray or _root.componentName.dirInfoImageArray from the _root timeline.
I will adapt the dirInfo setting though, so that it can read an array from a specified location.
are you able to post your cold fusion script, as i would be intersted in seeing it, as i haven't really worked with cold fusion before?
DawnUnder Post your modification and i'll see if i can correct it for you.
wiseganesha I'm afraid flash doesn't load png or gifs just jpegs. You could load 2 jpegs, as long as the yare both not progressive, but you would have to alter the component your self to create 2 empty mc's inside the imageStuff.image mc and then get it to load the jpegs to each of the empty mc's. By creating the two empty mc's inside the imageStuff.image mc all the other options will still apply to the imageStuff.image mc and thus to the stuff inside it.
e-mike Now i'm back in the uk i will be finding myself a good hosting company to host my stuff so hopefully it will all be up soon.
everybody and anybody Would it be usefull to have a reset loop that when pulled from the _root would also unload all the loaded thumbnails and loaded images from the component, then pull in new directory data from the root or txt file or php or whatever and load the new thumbs to crreate a fresh gallery?
Also I think i might create another component to make a slide show, based upon the same code.
Does anyone know of a really good hosting company that as great bandwidth and a lot of space, obviously paid space that is but still cheap?
I won't be doing much updating for a while as i still have to find a place to live in london but hopefully it will be soon.
ta ta, bugged
DawnUnder
10-02-2002, 10:24 AM
Hi Bugged, thanks for your reply by email also!!
I did the following modifications to line 616, but I will post the full code of your imagebox setup first:
// set the image box up
photoGallery.prototype.imageBox = function() {
this.createEmptyMovieClip("imageStuff", -10);
if (this.boxCentred == true) {
this.imageX = ((Stage.width/2)-(this.boxWidth/2));
}
this.imageStuff.createEmptyMovieClip("imageBox", -10);
this.imageStuff.imageBox._x = this.imageX;
this.imageStuff.imageBox._y = this.imageY;
this.imageStuff.imageBox.beginFill(this.imageBoxFi llClr, this.imageBoxFillAlpha);
this.imageStuff.imageBox.moveTo(0, 0);
this.imageStuff.imageBox.lineTo(this.boxWidth, 0);
this.imageStuff.imageBox.lineTo(this.boxWidth, this.boxHeight);
this.imageStuff.imageBox.lineTo(0, this.boxHeight);
this.imageStuff.imageBox.lineTo(0, 0);
this.imageStuff.imageBox.endFill();
this.imageStuff.createEmptyMovieClip("imageBoxLine", -8);
this.imageStuff.imageBoxLine._x = this.imageX;
this.imageStuff.imageBoxLine._y = this.imageY;
this.imageStuff.imageBoxLine.lineStyle(.25, this.imageBoxClr, this.imageBoxAlpha);
this.imageStuff.imageBoxLine.moveTo(0, 0);
this.imageStuff.imageBoxLine.lineTo(this.boxWidth, 0);
this.imageStuff.imageBoxLine.lineTo(this.boxWidth, this.boxHeight);
this.imageStuff.imageBoxLine.lineTo(0, this.boxHeight);
this.imageStuff.imageBoxLine.lineTo(0, 0);
this.imageStuff.createEmptyMovieClip("image", -9);
}this.imageStuff.onRelease = function()
GetUrl (xxxxxxxxxx)
{
In the "xxxx" obviously I should put the variable that links to the current image displayed (the source) but I can´t seem to find it!
boyzdynasty
10-02-2002, 12:22 PM
Originally posted by buggedcom
unfortunetly the day i arrived brought the crappiest weather they have had for the past one and a half months. Well at least they can't blame me for brining the weather over this time.
:p .... Doesn't it rain (like every day) in London....
-------------
I guess you're a very popular guy :D
When I get some time, I'm gonna try to do some stuff. I just got 3 mid-terms yesterday. :(
Anyways, I need to start practicin' and work more w/ ActionScript.
:p ...you're gonna be BZ with all these requests.
Should get ur own stuff situated first..... since you will be starting classes soon. *that should be fun* :D
About the loop thing...... by doing that, you mean... when the user loads up the page again, it will not display the image already previewed?
(OR) after it loads a pix, you just take it out of the thumb nail and load a new one into the scroller?
If you are to do that (either one) , maybe it should just be an option. [true/false]
....cuz ... I don't have madd pix to put up anyways.... ;)
ok.... off to classes :(
kamelus
10-02-2002, 02:00 PM
it's great work sincerly
but i have one suggestion : if you could modify this function
photoGallery.prototype.thumbnailActions = function()photoGallery.prototype.thumbnailActions = function()
to have like the combobox wit "setchangehandler" , than we can choose the function we execute when we press on the thumbnail
because if i have two instances of the tumbnails and i want to execute different functions from them i could not do that now
sorry for my bad english
i hope that you understand me
best regards.
Kamelus
kamelus
10-03-2002, 03:24 PM
/*
i have to insyance of photogallery p1 and p2 i have
i have tried to affect the trgt parameter dynamically
to the second instance by using this syntax
cB.thumbs["thumb"+seed].onPress = function() {
_root.p2.trg=_global.target
.................
................
}
but it dosen't work the second instance take the default target
can you help me ?
thanks
boyzdynasty
10-04-2002, 03:16 PM
Originally posted by buggedcom
Does anyone know of a really good hosting company that as great bandwidth and a lot of space, obviously paid space that is but still cheap?
i dunno if the link below will work but it's a forum that i just join recently for php help. http://www.php.net
but here's the link about web-hosting....
http://www.php-forum.com/p/viewtopic.php?t=38
have fun... I didn't sign up myself, b/c I think I will get free shiet from my school. *hehe*
:D
oops correction... the forum link is http://www.php-forum.com
buggedcom
10-05-2002, 09:06 AM
thanks for that, that's not a bad deal either. Also thanks for the php forum, that will come in really handy
buggedcom
10-05-2002, 09:37 AM
you inspired me to look for php forums, i just found one that's really good and has a large list of source php codes
http://www.codewalkers.com
boyzdynasty
10-05-2002, 06:30 PM
the site is pretty neat and HELPFUL.
my friend and I just got some SQL codes from it.
kamelus
10-08-2002, 01:50 PM
hi budgetcom
can you help me please
the init of the prototype is in onload function, well
if i want to change the parameter like :
cb.trgt = "new value"
and i want to reload the thumbnail with the new target when i click on a button
how can i do it using action script
it's very urgent
thank you
buggedcom
10-11-2002, 03:51 PM
... I've been busy enrolling at college, looking for flats, installing my own forum.
I've received so many emails about bothe the component and the original prototype that I'm a bit overwhelmed. I'm sorry that I haven't to replied to anyone in a while but i've just been too busy to help. I will set up a topic on my own site so that people can perhaps post there to get more of response, but it all depends on my timetable.
I will post later with the address.
buggedcom
buggedcom
10-12-2002, 07:20 PM
hi
I'm trying to get back into the swing of things and looking into the component again. Is anybody having problems with the php usage?
anyone looking for a current example can go to
http://photogallery.buggedcom.co.uk
boyzdynasty
10-12-2002, 09:41 PM
the example looks great.
I have yet to try out your latest version.
I did take a look at it though *just a glimspe* ;)
didn't really fig. out how to use it ... just yet....
O...nice pix. Were they from ur vacation at the "land down under?"
you don't mind if I e-mail you or IM (AIM) you w/ questions.....?
buggedcom
10-15-2002, 11:56 PM
detailed description
http://www.buggedcom.co.uk/forum/viewtopic.php?t=2
http://downloads.buggedcom.co.uk/photogallery.zip
a new adition to the family
http://www.buggedcom.co.uk/forum/viewtopic.php?t=3
http://randomphoto.buggedcom.co.uk
http://downloads.buggedcom.co.uk/randomphoto.zip
boyz... sure pm me AIM me email whatever.
NOTE The boards have been fixed but all user information has been lost there fore anyone subscribed to the posts will have to resubscribe or re register to post messages.
Baukz
10-18-2002, 07:41 PM
hi ,
first of all thx to share this delightfull script with us.
i have a question (mx newbie)....
when i make a movieclip and put the code in it.
i put the movieclip somewhere on the timeline.(e.g.Photoalbum)
but when my movie is leaving that spot on the timelime the gallery still stays in the movie.
when i leave that particular spot on the timeline, the gallery has to disappear. but it doesnt:confused:
i tried remove movieclip command but nothing appens.
can somebody give me a lead?
greetz baukz
buggedcom
10-18-2002, 08:33 PM
when you say the code.... what are you talking about? Have you just copied and pasted the original code at the begining of the script or have you used the component that is being developed?
boyzdynasty
10-20-2002, 01:16 PM
hey...bugg....
did you get the kinks out of your forum?
*smile*
I had posted up something there, but it's gone and it doesn't recognize my login and passwd :(
buggedcom
10-20-2002, 05:11 PM
kinks... ha.... after being up about a week and then having recieved a few new posts the bloody mysql db corrupted :mad: so i had to completley reset the database. I was going to copy the username and passwords from the old db to the new one but i completley forgot sorry. I will do it now though. Sorry your post is lost though. it was all the post information and headings that went belly up.
buggedcom
10-20-2002, 05:36 PM
try logging in now
boyzdynasty
10-20-2002, 07:35 PM
ok... I'll check it out later.
my posts were nothing important. But I'll post up the same unimportant thing again.
*hehe* :D
Hope all is well.
dgarrett
10-23-2002, 10:58 PM
I saw somwhere I think on the developers site, that there is now version 11. Does anyine have it they could email to me or post, also am I correct in understanding that there are two versions, a php and non. both would be great
So if anyone has this or somthing close it will be appreciated.
Anyine have thoughts on how to "export" a slide show from this type of on the fly dynamic system to a static version of itself in an executable flash file for use on a cd, or other not notworked media?
buggedcom
10-24-2002, 09:24 AM
I moved the downloads when i was trying to set up a download centre. Needless to say the centre doesn't work because i'm hosted on lycos with a crappy version of php4u. Anyway I have now moved the downloads back and the latest versions of slideshow, photogallery and randomphoto are at
http://downloads.buggedcom.co.uk/photogallery.zip
http://downloads.buggedcom.co.uk/randomphoto.zip
http://downloads.buggedcom.co.uk/slideshow.zip
:)
buggedcom
11-06-2002, 12:46 PM
...photoGallery = imageWeaver...!
checklist
-getUrl feature added :D
-auto image load feature added :D
for more info check out
http://www.buggedcom.co.uk/forum/viewtopic.php?t=2
the preview is also back up and running
http://photogallery.buggedcom.co.uk
unfourtuntately the download isn't available yet as I have got one or two more features/adjustments to make before i release imageWeaver v_1.0.
I've just had ADSL installed so as I'm more or less at my computer all day you can get in contact with me with AIM, so if anyone needs any help with anything my AIM user name is also buggedcom.
~buggedcom
DawnUnder
11-06-2002, 12:57 PM
YES!! Thanks for picking this up again!!
buggedcom
11-21-2002, 11:33 PM
I've uploaded the beta version of the component as it's probably gonna be a while b4 the final version is released.
http://downloads.buggedcom.co.uk/imageweaver.zip
I'm not sure if it's 100% reliable though but it does solve those pesky library problems. And gives you an idea of the new functions. See the readme inside the zip. :D
DawnUnder
11-22-2002, 07:13 AM
Great stuff man, thanks very much!!
buggedcom
11-27-2002, 07:14 PM
Just thought I'd let you know that I've nearly finished the gallery switcher. I think there are one or two bugs to sort out though so I would be grateful if anybody could test it. Thanks
http://photogallery.buggedcom.co.uk
Rupert
11-28-2002, 01:29 AM
I thinks its great. It has come a long way since you first posted it. Nice, clean, simple. Works for me, Great work.
Only one feedback issue though, when I changed to the Rocks gallery, I had no way of getting back again. The nav option wasn't then available.
Cheers,
Rupert
buggedcom
11-28-2002, 01:39 AM
Thanks, I spotted that too. It had something to do with the level of the swf that the nav was loaded into, it's sorted now (kind of - i just mulitplied the level by 20000. I'll have to sort the levels out before completion though)
Did you notice by any chance if any of the galleries didn't load? I've been having problems of server lag getting the php variables and then loading them into flash. there seems to be some kind of timeout error occuring.
Also added a thumb loading pause option in which you can stop the thumbnails loading and then restart them again.
:)
Rupert
11-28-2002, 01:46 AM
the only other wierd thing I'm getting like that is on the Dorringo Gallery. If you are in any other gallery and you select Dorringo, it will load up the first gallery images instead.
Hope this helps.
Rupert
buggedcom
11-28-2002, 01:53 AM
ahhh ok... at first i didn't quite understand but the dorrigo images are the first set of images. I've still to make the menu show the highlighted nav of the first set.
Thanks again.
Rupert
11-28-2002, 01:56 AM
No my mistake - just assumed you were starting at the top of the list. I should have looked a little closer.
Cheers,
Rupert
buggedcom
11-29-2002, 06:29 PM
attention everyone who plans on using the component
Due to cruz's (on were-here) help developing the php side of things I would like to know if anyone would object to the removal of the text file directory info source, as with php this kinda becomes a redundant source of information? If no one says anything within the next 3 days then I will delete the text info handling.
LilleMartin
11-30-2002, 05:23 PM
This is truly a great component. Sadly I'm not too bright when it comes to how all of this works.
Could someone please explain to me what I need to do to get this to work?
Or more specifically: What should the respective filenames be for the thumbs and the bigger images?
Where should the thumbs and images be stored? In separate folders?
Where do you specify how large you want the viewing area to be?
Thanks in advance, and once again; That's a hell of a job you've done there.
-M
buggedcom
11-30-2002, 05:38 PM
This is truly a great component.
Thanks
Sadly I'm not too bright when it comes to how all of this works. Could someone please explain to me what I need to do to get this to work?
There are too many parameters without any documentation, but for the final release I will be adding a custom ui that will walk you through the setup process if need, it will also allow you edit parameters individualy if required. I'm going to post a transcript of a chat that i had with someone about how to set up the main basic params. There are two many for me to walk you through every one so see if you can follow it.
Or more specifically: What should the respective filenames be for the thumbs and the bigger images?
the naming can be whatever you like so long as you specify a number at the end of each image. ie image_1 image_2 image_3 etc, if you are going to use the php option they have to have a 0 infront of any number to get them to order properly like so image_001 image_002 image_003 ... image_011 ... image_395
Also the names of each thumb should be the same as each corresponding image name
Where should the thumbs and images be stored? In separate folders?
That is entirely up to you because you set the directory information in the component. I like to use
pictures
--> holiday snaps
--> images
--> thumbnails
There should be no other files in the folders if using the current php version.
Where do you specify how large you want the viewing area to be?
Look for image box width and image box height in the component parametres
Thanks in advance, and once again; That's a hell of a job you've done there.
:D :D :D :D :D thanks, keep an eye out for the updates or if you have any specific information queries you can post them here or on my own
forum (http://www.buggedcom.co.uk/forum/viewforum.php?f=13)
buggedcom
11-30-2002, 05:46 PM
Can you advise on a basic setup? I would love to try it but don't know how to beggin
yeah i think that if you're gonna design a component you might as well make it completley skinnable to make it good for all situations.
ok
the easiest way to set it up is to get all the directory information from the component
so set directory info to component
ignore create gallery thumbs its redundant
and gallery thumbs array
in the swf directory create a pictures folder
in that then create a folder with a theme name
then in that create a folder images and a fodler thumbnails
ok
in the images folder place your images with sequenced name ie image_1, image_2, image_3
do the same for your thumbs
ok
all done?
yes, I'll output the pictures from Iview
in thumb directory info type - pictures/-your theme name-/thumbnails
in images do pictures/-your theme name-/images
9:50PM
first image number is the first image that you want to start loading
last image is the one you want to stop loading at
those are in number form by the way
1 for image_1
or 21 for image_21
ok
set the format to jpg
(it can by swf files aswell)
great
don't worry about txt path that's only for when you need to get the info from a txt file
Should I set "create gallery thumbs" to false?
no need to worry about that because it doesn't do anything any more
ok
9:55PM
ignore the rest till - thumb load reverse - is up to you if tru it means that you will load the images in reverse number order. that means that if you uplaod new files they will be presented first
stop cache is a html setting
if true it means that the images and external files won't load into the cache
ignore the rest till auto load
hold it : were is thumb load reverse?
below php array slice setting
ok
choose wether or not you want to autoload an image
10:05PM
if choose your own selet the file path of the images in the next box
auto image caption means that the gallery will load with a caption already in place if you choose captions later
Great stuff
no override means that when you click on a new thumb the loaded caption will be overridden
Were are the captions kept?
override but include means that it will keep the load caption + add the new ones after it
i'll get to that in a min
override means the load caption is always there and you won't see any others
Wich one should I set ? i want to do something like the Margarita pictures I showed you
picture + caption
either no override or override but include
ok
I put the latter
override but include
10:10PM
choose your type of get url activation
Whi there is an option release ? What is that for? to open a new window when touching the large image?
option release attaches a mc from the library which you can edit. it will then place it in the movie positioned where you set below
I'm feeling duuuuumb.... why would you need that?
then choose in what window you want to open the url in
because it is more intuative for the end user to see a button that launches an url than clicking on an image...
I see... you mean to give a third size picture?
10:15PM
.. to open a link say if you were using it for a web portfolio you could launch the site (it only does relative urls though) or you could give acces to hi res images for download
when opening the window have tought on letting people specify a frame name? that way it can appear beside it
Or is there a way to open the large picture withing flash?
no neither but that is a good point i will add that
I think it would be good
go on then : what is "get URL directory path"?
where you keep the hi res files or html redirect link pages
I'm gonna have to do some work soon as it's getting late over here.
10:20PM
basically the setup above should load the images as long as they are not progressive jpegs
you can experiment with the settings as the rest should be easy to set up and work with once you have a basic thing happening
How doyou ad captions?
las question
ok the next set of parameters deals with the captions
you can choose where you get the info from
either from an array a few boxes down or from a text file that is includeed in the zip named captionData.txt
I saw that... how do I name the variables there
?
oviously the first caption in the array will load with the first image in the thumbnail bar
is it comma separated?
basically the text file is an array
&
... yes an the commas seperate the values
so if you want no captio nwith an image just do a double comma like in the txt already
ok
hoe doyou include a caption with a comma in it?
with ""?
that's a good point i don't know, it's been a long time since i added the captions so i have forgotten. I think the txt file is actually a string that gets split into an array by the commas
but i could be wrong
experiment with that one
ok, I'll do that. YOu may want to assemble the array from the txt in some other way
&caption1="this is one of the most beatifull, awesome pictures i took"&
yeah i'll have to think about that. but with the new image information system that I am planning theis exsiting one will probably getted scrapped
10:30PM
yeah that's better
it'll probablyly allow html formatting aswell
great I'll talk to you about it later. I wan't to show you how I did it for a recent site we made
cool, just checked the code and it is a string and splits at the comma
ok good luck
buggedcom
12-05-2002, 11:11 PM
i have finally got around to sorting out a feature list
http://www.buggedcom.co.uk/forum/viewtopic.php?p=94#94
add any to the list that you think are missing
buggedcom
12-08-2002, 05:21 AM
check out the latest preview version. I think the gallery switcher is 100% working except that server lag problem. If nobody can find any problems with it i'll upload the new zip (still not a complete version 1 though - but getting there)
http://photogallery.buggedcom.co.uk
boyzdynasty
12-08-2002, 05:44 AM
hehe... workin' hard on the code!!
Nice.
How's the paper comin' along? *smile*
I haven't check your component but I had taken look at the photogallery site.
Very nice. You done a lot of changes from ver1.
Keep it up! You might get an "A" for this project.
....hehe....
buggedcom
12-09-2002, 02:24 PM
new download available
new working features > gallery switcher and info box
I have just updated the imageWeaver zip and it contains a directory structure setup that all you have to do is fill the folders with images and thumbs. It also contains a working fla file of an example setup but it is set up to use the php option at the moment because the new update the gallery switcher only runs on php. Also the info box option is now complete. To see it in action visit the demo and go to either australia > skiing or weather phenonemon > weird may weather. It does work on every gallery but i can't be arsed to fill in info for all the 500 something photos.
http://photogallery.buggedcom.co.uk
http://downloads.buggedcom.co.uk/imageweaver.zip
bongbox
01-08-2003, 10:40 PM
i cant make it werk
any instruction how could i make the imageweaver werk
buggedcom
01-08-2003, 10:48 PM
Don't worry i am planning a custome user interface that will walk you through step by step but for now if you post screen grabs of your component parameters window and your directory structure of you galleries i will try to help you. Also if you were more descriptive it might help. First thing to check is that your jpgs are not progressive.
boyzdynasty
01-09-2003, 03:02 PM
jpeg progressive...?
what does that mean.....
boyzdynasty
01-09-2003, 03:27 PM
it was explained...
http://www.actionscript.org/forums/showthread.php3?s=&threadid=20816
buggedcom
01-15-2003, 03:08 AM
I NEED BETA TESTERS
I need people who can spend 10 or two mins seriously testing v_1.0.b b4 i upload it to flashcomponents.net . I need serious testing with all settings. Also a critique on the user interface setup. Now the beta won't be ready untill sometime tomorrow but i need to know if anyone can take a good look at it. If you can great and thanks. I'll post here 2mrow when i'm done.
That's all for now.
buggedcom
01-22-2003, 02:36 AM
for anyone who wanted to test the beta interface for me...
download it from here....
http://imageweaver.buggedcom.co.uk/
bear in mind that it is just a beta and allow the interface works 95% there are a few errors. i am aware of most of them but if you could be so kind as to drop me a line about them that would be great. thanks.
buggedcom
01-31-2003, 05:47 PM
I've implemented a whole heap of getter and setter functions. but there are so many it's gonna take an age to document. This means that you should be able to create mc's external from the component that control the options and core functions inside the component
does anybody want to help document the xml reference sections. I have fully documented the user interface with all the features and options except these new getter and setter functions. if you can't help at the moment can you supply a sample xml file for a reference page? so i can begin work on putting the help files into xml format.
I won't release the next beta untill i have finished and tested the getter setters. if someone wants to help me with the testing of it please pm me and i'll send you the link of the new beta.
anybody having any problems with it so far....?
buggedcom
02-04-2003, 03:00 PM
note.
I just discoverd an error in the way the interface passes the filename suffixes with the dirInfo setting 'component'. If anyone has noticed this it is an error that has been fixed.
buggedcom
02-15-2003, 05:21 PM
last update b4 final release available
this is the most stable release so far and it has major speed improvments over the previous versions. I reworked the code to increase the speed at which thumbnails load. It is also less processor intensive as it uses tempory mc's to fade stuff.
other updates
other updates include, thumbnail tips, image printing and watermarking functions (although the watermarking is not yet working). The getter setters are now live. the documentation for them can be installed using the supplied mxp file via the extension manager. if you don't want to intall the manager then the fla and the reference panel xml files are also included in the download. I haven't tested all the getter setters because there's so bloody many of them. if anyone finds an error let me know. The gallery switcher can now either be used or you have the option to load the data and spit it to the root in the form of the array (see the user interface documentation).
The user interface has had a rework also. it is now a much smoother running app. although there are several issues with the documentation and returning to the last page, but i am aware of what is wrong and will fix.
other
This probably will be last update for a couple of weeks as i have to finish my dissertation in two weeks, i've still got 3000 words to write and research. :shock:
download here (http://imageweaver.buggedcom.co.uk)
DawnUnder
02-15-2003, 07:38 PM
Thank you for the hard work and good luck with your dissertation!!
Ricod
02-16-2003, 10:08 AM
Wow ! I feel like some kid doing some kind of game on the pavement and while doing so finds himself a bundle of money !
Thanks for sharing buggedcom ! This will save a lot of time !
buggedcom
02-16-2003, 01:15 PM
ah... i love that feeling, just like finging a tenner in your jacket pocket that you had completley forgoten about.
cheers.
buggedcom
02-16-2003, 01:22 PM
... oh and i'll also be adding xml support btw and possible database stuff
spazmaster
02-16-2003, 06:40 PM
yeah thx bugged! i set this up within 30 mins! (including the batch gallery that photoshop did for me)
you can see how fast it goes with this version @
www.go-impact.nl/imageweaver
ps. whats a tenner? anyways that reminded my of a Chupapups in my jacket LOL! thx dude :D
buggedcom
02-16-2003, 06:45 PM
a fiver - a five pound note
a tenner - a ten pound note
etc
hmmm chupapups... that reminds me of Auz as a special offer in a supermarket over there they did 100 for $3 (AUD)
buggedcom
02-16-2003, 07:19 PM
arrgghhh i hate my dissertation, and therefore i am avoiding doing it by telling you about the thumbnail state handlers. You can now also assign functions to the thumbnails in a similar way to the change handlers of flash's original components.
you can call functions from the
onRollOver
onRollOut
onRelease
onReleaseOutside
onPress
onLoad
states. This means you have greater control over the thumbnails. you can assign brightness changes, tints, alpha levels etc etc. I will eventually bring out a set of functions for different effedts for the thumbs.
the functions have to sit on the _root of the timeline though, they can not be anywhere else as i haven't assigned a destination function as i didn't think it was nessecery, but if people do feel they need it then i will.
also you will need to know that all of the state handlers have two parameters you can use, the first is the target mc and the second is the currently active images associated thumbnail.
below is an example set of functions that init the thumbs with a 50 _alpha level and on roll over or active the thumb is set to _alpha 100;
function thumbInit(mc, current) {
if (mc == current) {
mc._alpha = 100;
} else {
mc._alpha = 50;
}
}
function thumbOver(mc, current) {
mc._alpha = 100;
}
function thumbOut(mc, current) {
if (mc != current) {
mc._alpha = 50;
}
}
function thumbRelease(mc, current) {
if (mc != current) {
current._alpha = 50;
mc._alpha = 100;
}
}
i feeel that this is a really useful part of the component as you can really change the thumbnails. also if anyone fancies writing some functions for the thumbs i had thought about starting up a little library of them to put into the user interface. whadya think?
oh also you can now activate or deactivate the thumbnail blinking.
buggedcom
02-17-2003, 09:50 PM
thumb function based on rpenners brightness code, to be placed on the root and appropriatly referenced in the user interface
// robert penner colour prototype;
Color.prototype.setBrightOffset = function(offset) {
var trans = new Object();
trans.rb = trans.gb = trans.bb = offset;
this.setTransform(trans);
};
function brightnessChange(mc, targetIntensity) {
mc.col = new Color(mc);
mc.onEnterFrame = function() {
if (targetIntensity>mc.intensity) {
mc.intensity += 25;
if (mc.intensity>targetIntensity) {
mc.Intensity = targetIntensity;
}
mc.col.setBrightOffset(mc.intensity);
} else if (targetIntensity == mc.intensity) {
delete mc.onEnterFrame;
} else {
mc.intensity -= 25;
if (mc.intensity<targetIntensity) {
mc.Intensity = targetIntensity;
}
mc.col.setBrightOffset(mc.intensity);
}
};
}
function thumbInit(mc, current) {
if (mc == current) {
brightnessChange(mc, 150);
}
mc._alpha = 100;
}
function thumbOver(mc, current) {
brightnessChange(mc, 75);
}
function thumbOut(mc, current) {
if (mc != current) {
brightnessChange(mc, 0);
}
}
function thumbRelease(mc, current) {
if (mc != current) {
brightnessChange(current, 0);
brightnessChange(mc, 150);
}
}
buggedcom
02-23-2003, 02:29 AM
here is the final function list for the version 1 release, that will be released tomorrow sometime.
function list
image functions
image preload bar
- automatic centering
- getter functions for bytesLoaded and bytesTotal
loaded image
- automatic image centering to a skinnable boundary if required
- image squashing to fit skinnable boundaries
- image state handlers for linking to functions on the _root timeline
---- onLoad
---- onRollOver
---- onRollOut
---- onPress
---- onRelease
---- onReleaseOutside
- changable alpha fade in rate
- autoloadable image if required
---- choose from, the first image, a random image, or a predetermined image
thumbnail functions
thumbnail state handlers
- image state handlers for linking to functions on the _root timeline
---- onLoad
---- onRollOver
---- onRollOut
---- onPress
---- onRelease
---- onReleaseOutside
- precoded onRelease blink function
thumbnail preloading
- individual preloading
---- individual thumb preload bar
---- getter functions for bytesLoaded and bytesTotal
- total preloading
---- a preload bar for the total amount of thumbs to load
---- getter functions for the current amount of thumbs loaded and the total amount of thumbs to load
---- four predefined loading text choices to choose from
thumbnail scrolling
- horizontal scrolling
---- changeable scroll rate
---- scroll slowing [ with a slow down rate ] or scroll stop dead functions
- vertical scrolling
---- changeable amount of visible levels
---- changeable scroll rate
- changable speration distance
- thumbnail squashing to fit scroll mask
- changable alpha fade in rate
- thumbnail arrows, only activated if needed (automatic)
---- changable alpha fade in rate
thumbnail framing
- fitting the thumbs into a skinnable 'frame' for precise positioning
thumbnail tips
- file name, image name from image info text file
thumbnail load reversing
- loads the thumbnails in reverse order
thumbnail load pausing
- gives the user ability to puase the thumbnail loading process
- paused message
- skinnable button
- inactive button state
other functions
for all
- changable alpha fade in rate (one value for all options)
getUrl
- assign an url to specific images from a text file
- specify which window to launch the url in
- skinnable button
- inactive button state
information panel
- loads image information from a text file and displays it in a panel
- information options
---- image date
---- image name
------- file name
------- name from text file
------- if no text file then file name
---- image description
---- image creator
---- image creator details
- skinnable button
- inactive button state
image downloads
- forced download images through php (ie no need to open them in a new window and right click, just a click in the gallery downloads the file)
---- update from beta [ now without opening a blank window ]
- specify which files to download through loading a text file
- specify a folder to download files from, useful for downloading hi-res images
- skinnable button
- inactive button state
image print
- print images through click of a button
- add a watermark if required
- specify which files to print through loading a text file
- skinnable button
- inactive button state
gallery title
- header box
---- title read from the folder names
------- category name
------- sub category name
------- category name + sub category name
---- title read from information panel text file
anti caching procedures
- stop caching of individual types of files without stoping others
---- stop php caching
---- stop text file caching
---- stop image caching
gallery switcher
- two different input types
---- text file
---- php file
- galleries folder
- internal or external methods
---- internal
------- pre coded gallery switcher
------- visited states
------- active states
------- button spacing control
------- inactive menu message
---- external
------- loads data from the external files and spits the data into the _root as an array
---- switch gallery query
resource methods
- php file
---- image limiting
- text file
- internal component array
---- different images from different folders
- internal component settings
- startup gallery
---- universal image directory setting
---- universal thumbnail directory setting
- xml method pending for 1.1
debugging
internal debugger, alerts if something is wrong
---- customisable debugging levels
------- gallery switcher debugger
------ - extra options debugger
------ - thumbnail loading debugger
------ - image loading debugger
------- data loading debugger
------- getter setters debugger
getter setters
there are over 140 public getter and setter functions that allow for greater control over imageWeaver. Install via the extension manager and refer to the reference panel for more information. All of the getter setters are fully documented
user interface
the component has a full user interface which also includes a huge amount of documentation, and connection to live data (when i have my server issues sorted out)
But I've got some question pls
first here is how my galleries folder
galleries
-aout 2002 - 02-03
-aout 2002 - 25-26
-- part1
-- part2
-welcome
ok. Welcome is my startup gallerie. It works.
When I click on aout2002 - 25-26 and select a sub gallerie, it works.
BUT when I click on aout 2002 -02-03 or welcome, it doens't work. It show me the subdirectory (which are "small" for the thumnails, "images" for the images and "download"). Why that?
Else I have another question about the download directory.
Where must I create it. In each gallerie as I done or is it a single folder. If then, how can I do when having file with the same name in different category...
Thx a lot....
And one more time GREAT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CU ;)
buggedcom
03-02-2003, 04:15 PM
Hi,
the way the gallery switcher currently works is that it can only switch between sub galleries and you cannot have a main category to switch to. All of the main categories must contain a sub category that contains the images and thumbnails folders.
I am going to revise this but not in the near future as in the final v_1 release (just ironing out a few bugs) you can choose to spit the data to and array to the root from which you can program your own menu to change the gallery.
The downloads folder is contained in each gallery, but you can set it to download the images from the images folder if you so wish just by changing the download folder name in the interface to 'images'. There is a bug with downloads in the current download though, i have sorted it and will release the fix soon.
Hope this helps.
Thanks
ok thx a lot for your answer...
Then I'll be waiting for the next release ;)
CU and one more time GREAT WORK ;)
flavoredthunder
03-02-2003, 11:08 PM
Wow ha ha nice prototype. I wrote my one one too but mine was posted in the actionScript Section. I have spent some time trying to get used to flash MX and have written my first image gallery prototype with dynamic tool tips and status bars to boot. If anyone is interested in the code please find it inserted below. To use this script just save it as an .as file and #include it in your movie. To load the functions call the function alb_loadPage(xmlFile) with a reference to you XML file.
To see a working example please try:
:D http://www.markdaggett.com/dev/flash/imageGallery.html
For an example of the required XML format please view this:
:D http://www.markdaggett.com/dev/flash/albums.xml
Code:
/************************************************** *****
* Assign default Values to the variables used
************************************************** *****/
function alb_intAlbum(){
imgDepth = 0 // level which contains no other elements.
AlbumList = new Array()
curAlbum = 0
}
/************************************************** *****
* Request XML page from server
************************************************** *****/
function alb_loadPage(xmlFile){
alb_intAlbum()
albumXML = new XML();
albumXML.onLoad = alb_parseXML;
albumXML.load(xmlFile);
albumXML.ignoreWhite = true;
}
/************************************************** ******
* Parse the incoming XML
************************************************** ******/
function alb_parseXML(success){
if(success){ //file loaded ok
AlbumList = new Array()
for(xalb = 0; xalb < albumXML.childNodes[0].childNodes.length;xalb++){
AlbumList.push( albumXML.childNodes[0].childNodes[xalb] );
}
//create a movieclip to hold the album images.
createEmptyMovieClip("album",imgDepth++);
album.loadAlbum(albumList[curAlbum]);
album._x = Stage.width/2 - album._width/2
album._y = Stage.height/2 - album._height/2
}else{
trace("ERROR: Could not load XML file"); //XML file could not be loaded
}
}
/************************************************** ***********************
* Title : ProgressBar
* Author : Mark Daggett
* Description : Creates a progress bar for the loading of images or movieClips.
*
* content : String : Path to content to load
* lWidth : Int : Width of content
* lHeight : Int : Height of content
* lColor : String : Hex Values for progressbar colors (e.g. "ffffff")
************************************************** ***********************/
MovieClip.prototype.progressBar = function(content,lwidth,lheight,lcolor){
if(lColor ==null){
barColor = "CCCCCC";
}else{
barColor = lColor;
}
this.createEmptyMovieClip ("progressBorder", 1);
this.createEmptyMovieClip ("bar", 2);
this.createEmptyMovieClip ("imgBorder", 3);
this.createEmptyMovieClip ("img",4)
//load the movie into the placeholder clip
t = new Date()
//this.img.loadMovie(content+"?"+String(t.getMilliseconds()));
this.img.loadMovie(content);
var theImg = this.img;
var theBorder = this.progressBorder;
var theImgBorder = this.imgBorder;
//create the image border
with (this.imgBorder){
lineStyle (0, String("0x"+barColor), 100);
moveTo (0, 0);
lineTo (0, lHeight);
lineTo (lWidth, lHeight);
lineTo (lWidth, 0);
lineTo (0, 0);
endFill();
}
//create the border around the progress bar
with (this.progressBorder){
lineStyle (0, String("0x"+barColor), 100);
moveTo (0, 0);
lineTo (0, Math.min(lHeight/10,10));
lineTo (lWidth/2, Math.min(lHeight/10,10));
lineTo (lWidth/2, 0);
lineTo (0, 0);
endFill();
_x = lWidth/2 - this.progressBorder._width/2;
_y = lHeight/2 - this.progressBorder._height/2;
}
//create the progress bar
this.bar.onEnterFrame = function () {
theImg._visible = false;
var fin = Math.max(0,int(theImg.getBytesLoaded()*100/theImg.getBytesTotal()));
with (this){
beginFill (String("0x"+barColor), 100);
moveTo (0, 0);
lineTo (0, Math.min(lHeight/10,10));
lineTo (Math.min(theBorder._width,int(theBorder._width*(f in/100))), Math.min(lHeight/10,10));
lineTo (Math.min(theBorder._width,int(theBorder._width*(f in/100))), 0);
lineTo (0, 0);
endFill();
_x = theBorder._x;
_y = theBorder._y;
if((fin >= 100) &&(theImg._width >0)){
theBorder.removeMovieClip();
theImgBorder.removeMovieClip();
if(lWidth != undefined){
theImg._width = lWidth;
}
if(lHeight != undefined){
theImg._height = lHeight;
}
theImg._visible = true;
this.removeMovieClip();
}
}
}
}
/************************************************** *******
* Title : Load an Album
* Author : Mark Daggett
* Description : Accepts a XML file in the predefined format (see FAQ).
* Loads thumbnails for the album and assigns
* vaules to the buttons.
* lAlbum : XML : XML document that contains the album info.
************************************************** *******/
MovieClip.prototype.loadAlbum = function(lAlbum){
var alb_title = lAlbum.attributes.title
var alb_bgcolor = lAlbum.attributes.bgcolor
var alb_width = int(lAlbum.attributes.width)
var alb_height = int(lAlbum.attributes.height)
var alb_cols = int(lAlbum.attributes.cols)
var alb_imgCount = int(lalbum.childNodes.length)
var alb_gutter = int(lAlbum.attributes.cellspacing)
var alb_fgColor = lAlbum.attributes.fgcolor
var alb_colWidth = ( alb_width - (alb_gutter + (alb_gutter*alb_cols)) ) / alb_cols
var alb_row = 0
if( String(alb_bgcolor).length < 1 ){
alb_bgcolor="ffffff"
}
if( String(alb_fgcolor).length < 1 ){
alb_fgcolor="cccccc"
}
with (this){
beginFill (String("0x"+alb_bgcolor), 100);
moveTo (0, 0);
lineTo (0, alb_height);
lineTo (alb_width, alb_height);
lineTo (alb_width, 0);
lineTo (0, 0);
endFill();
}
/************************************************** *********
*Create a tool-tip
************************************************** **********/
this.createTextField("tooltip",1000,0,0,150,0);
this.tooltip._visible = false;
this.tooltip.autoSize = "left"
with(this.tooltip){
multiline = false
wordWrap = false
selectable = false
background = true
border = true
borderColor = String("0x"+alb_fgColor)
backgroundColor = String("0x"+alb_bgcolor)
textcolor = String("0x"+alb_fgColor)
}
this.onEnterFrame = function(){
this.tooltip._x = this._xmouse + 10;
this.tooltip._y = this._ymouse - 10;
}
/************************************************** ******************
*Build Rows and Colums for images
************************************************** *******************/
while( alb_imgCount > 0){ //parse out images to the coloum and rows
for( xcol = 0; xcol < alb_cols; xcol++ ){ //new Row
if(alb_imgCount > 0){ //new image in the row
var curImg = lAlbum.childNodes[lalbum.childNodes.length - alb_imgCount]
var nodeAlt = curImg.childNodes[0].attributes.alt // Alt text for when the mouse rolls over.
var nodeSrc = curImg.childNodes[0].attributes.src // Location of the image to load.
var nodeLink = curImg.childNodes[1].attributes.src // Link for the larger image or file.
var nodeSmWidth = int(curImg.childNodes[0].attributes.width) // Width of the larger image or file.
var nodeSmHeight = int(curImg.childNodes[0].attributes.height) // Height of the larger image or file.
var nodeLgWidth = int(curImg.childNodes[1].attributes.width) // Width of the larger image or file.
var nodeLgHeight = int(curImg.childNodes[1].attributes.height) // Height of the larger image or file.
var nodeText = curImg.childNodes[1].firstChild.nodeValue // Text description of the image or file.
//create an movieClip to hold the image.
this.createEmptyMovieClip("image"+(lalbum.childNodes.length - alb_imgCount),imgDepth++);
eval("this.image"+(lalbum.childNodes.length - alb_imgCount)).progressbar(nodeSrc,Math.min(alb_co lWidth,nodeSmWidth),Math.min(alb_colWidth,nodeSmHe ight),alb_fgColor)
eval("this.image"+(lalbum.childNodes.length - alb_imgCount))._x = (xcol*alb_colWidth) + (alb_gutter*xcol) + alb_gutter
eval("this.image"+(lalbum.childNodes.length - alb_imgCount))._y = (alb_colWidth*alb_row ) + (alb_gutter*alb_row) + alb_gutter
//assign button properties
eval("this.image"+(lalbum.childNodes.length - alb_imgCount)).altText = nodeAlt;
eval("this.image"+(lalbum.childNodes.length - alb_imgCount)).link = nodeLink;
eval("this.image"+(lalbum.childNodes.length - alb_imgCount)).imgText = nodeText;
eval("this.image"+(lalbum.childNodes.length - alb_imgCount)).imgWidth = int(nodeLgWidth);
eval("this.image"+(lalbum.childNodes.length - alb_imgCount)).imgHeight = int(nodeLgHeight);
eval("this.image"+(lalbum.childNodes.length - alb_imgCount)).img = nodeSrc;
//RollOver function for the image MovieClip
eval("this.image"+(lalbum.childNodes.length - alb_imgCount)).onRollOver = function(){
if(this.altText != undefined){
this._parent.tooltip._visible = true;
this._parent.tooltip.text = String(" "+this.altText);
}
}
//RollOut function for the image MovieClip
eval("this.image"+(lalbum.childNodes.length - alb_imgCount)).onRollOut = function(){
this._parent.tooltip._visible = false;
this._parent.tooltip.text = "";
}
//Release function for the image MovieClip
eval("this.image"+(lalbum.childNodes.length - alb_imgCount)).onRelease = function(){
this._alpha = 25;
//create large background.
this._parent.createEmptyMovieClip("bg",imgDepth++)
this._parent.bg.onRelease = function(){
//delete the blow up image and background.
this._parent.img.removeMovieClip();
this.removeMovieClip();
}
with(this._parent.bg){
beginFill (String("0x"+alb_bgcolor), 90);
moveTo (0, 0);
lineTo (0, alb_height);
lineTo (alb_width,alb_height);
lineTo (alb_width, 0);
lineTo (0, 0);
endFill();
}
/************************************************** *********
*Create large image to display
************************************************** *********/
this._parent.createEmptyMovieClip("img",imgDepth++);
//Scale the image to fit the screen.
var scaledW = 0
var scaledH = 0
if(this.imgWidth > this.imgHeight){
//Horizontal image
if( int(this.imgWidth) > int(alb_width) ){
//Image width is greater then album width
var scaler = alb_width / this.imgWidth
this._parent.img.progressbar(this.link,Math.min(al b_Width,this.imgWidth),this.imgHeight*scaler,alb_f gColor)
scaledW = Math.min(alb_Width,this.imgWidth)
scaledH = this.imgHeight*scaler
}else{
//Image width is less than the album width
this._parent.img.progressbar(this.link,this.imgWid th,this.imgHeight,alb_fgColor)
scaledW = this.imgWidth
scaledH = this.imgHeight
}
}else{
//Vertical image
if(this.imgHeight > alb_height){
//Image is taller then the album
var scaler = alb_height / this.imgHeight
this._parent.img.progressbar(this.link,this.imgWid th*scaler,Math.min(alb_height,this.imgHeight),alb_ fgColor)
scaledW = this.imgWidth*scaler
scaledH = Math.min(alb_height,this.imgHeight)
}else{
//Image is not as tall as the album
this._parent.img.progressbar(this.link,this.imgWid th,this.imgHeight,alb_fgColor)
scaledW = this.imgWidth
scaledH = this.imgHeight
}
}
//Center the image on the screen.
this._parent.img._x = ( alb_Width - scaledW )/2
this._parent.img._y = ( alb_Height - scaledH )/2
//Display the text for this image
this._parent.img.createTextField("displayText",imgDepth++,0,scaledH , scaledW,scaledH)
with(this._parent.img.displayText){
multiline = true
wordWrap = true
selectable = false
html = true
htmlText = this.imgText;
}
}
alb_imgCount--
}
}
alb_row++
}
}
Ya ... another great code, for another use ;)
buggedcom
03-03-2003, 01:10 PM
i really like the tool tips on the thumbs, but i'm not so sure about the way you get the thumbs squashed to the boxes, because you haven't constrained the scalling methods and thus you get a uneven scalled look, if you wanted the thumbs to tightly fit the boxes, why don't you scale the thumbs so they are constrained and both the x and the y scales are larger than the boxes then mask them to the boxes. Thus giving and constrained scale look but still fits to the box.
flavoredthunder
03-03-2003, 02:30 PM
yeah there is a scaling method for the large images. The reason i did not do it for the small images is
1. you can control the number of thumbnails and the thumbs will scale down accroding to the size available but not up. So if there were only 10 images everything would fit right.
2. I like the grid effect so that is the reason i scale the height and width to be the max of the grid width and height. But it is easily changed if you want true proportions like on the blow-up
dasso
03-20-2003, 02:38 PM
Hi:
Today I discovered this great post searching for example of image viewers.
I have donwloaded like 3 version, but I cannot get the PHP to work!
I have seen very well the images with array or component list, but never in PHP.
I have PHP well configured and works on my computer, I have PHP selected in the component too, but I cannot get any image viewed
:confused:
Do you know what happen?
buggedcom
03-20-2003, 07:37 PM
hmmm could be any number of reasons. Which version are you using?
buggedcom
05-13-2003, 11:05 PM
there are still a few bugs around and i am in the process of a major revamp, both the code, the setup and the user interface so it will keep getting better. Below are a few things that you can look forward to.
// CODE
- dramatically reduced code, removed 700 lines (so far)
- speed optimized code
- less getter setters, but better performing
- sorted file parsing issues through reorganising the code
// UI
- "babysteps" setup, exact setup procedure and directions for creating the directory and seting up the text files
- advanced setup procedure, 'no molycodling'
- stored setups in sharedObject for quick setups
- save-able setups in text files that can be reloaded
- menu on same screen
- new design and layout
// FEATURES
- xml data input option
- asp data input from which i need help with the asp
- combined the text files for better performance and ease of use
- gd / imagemagick image library watermarking to force downloaded images
- fixed printing bug
- more state handlers for the option buttons
- gallery switcher menu xml output, for various xml menus
- adapt the switcher code so it can go through 0 - unlimted amounts of nested galleries
- file not found error detection (a bit buggy so might not include it)
- personal "favourites" folder residing in the shared object
// MISC
- two versions through installed, one with getter setters and debugger, and one without
- the later is lighter on kb but might not be as customisabel as required
any other suggestions or queries?
farafiro
05-14-2003, 02:42 PM
ahhhhhhhhh
does this still going
http://www.were-here.com/forum/tm.asp?m=158634&p=1&tmode=1&smode=1 :D
buggedcom
05-14-2003, 02:51 PM
yes i thought i might aswell start the cross posting back up again for ol' times sake, it's been a while since i was on were-here, and good to see it's back up again, although it appears to be full of bugs :( but i'm sure they'll get it sorted
d-rail-2002
07-24-2003, 02:23 PM
Ok. So the download image feature isn't working yet. So what I want to do is use the image handlers function to open the image in a new browser window.
Sounds simple, right?
Ok, I add a function to the image handler, say I'll call it "imageGetter". On the root timeline, I create the function with a variable to capture the image.
function imageGetter(image){
trace(image){
}
What is returned is the movieclip instance name of the image. Something like _level0.instance36.image.mc
Now. the next step is to find out what the actual image URL is for that image. This will be a string like "galleries/1998/photos/image001.jpg"
Once I get this URL, I can do a getURL(imageString,"_blank") to pop up the new window so the user can save the image.
So, how do I query the movie clip to find out what the path name is of the stored image? I'm sure there's a way but I can't find it.
Also- if anyone has fixed the forcedownload problem, please post the solution here because it would make life simpler.
Here's the website I'm working on. Choose "photos" from the menu.
http://www.wildinthewoods.com
thanks
Daryl
buggedcom
07-24-2003, 03:42 PM
daryl, the download image function does work, it's just it's a little buggy, as long as you are downloading the images from the same folder as the main images folder it works.
you will also need to have php running.
there is no way to get the url without hacking the code... here's what to do...
around line 1712 look for the function
gal.prototype.createButton_image = function() {
the find the onRelease function inside that function and replace it with this
this.image.mc.onRelease = function() {
_root[cB.imageReleaseChangeHandler](this, cB.urlArray[cB.indexNum]);
};
then try this function as the state handler
function imageGetter(image, url){
trace(arguments){
}
also no need to double post you can just post in one of the threads to get my attention
drliebs
08-12-2003, 11:43 AM
I know that not everything can or should be shared, especially when someone puts in a lot of hours and giving it away could make someone else money.
That said, thanks for sharing. Stuff like this helps make guys like me a better developer. Your work and others like you will benefit the whole community. So to all of the rest of us, if you have something cool that you can share, please do, and if you use someone elses work, make sure you give them their props!
ThunderOne
09-19-2003, 07:39 PM
Hi guys I got version 8 working just the way I want but cant get text importing with each picture can anyong help? thnx
Colin Campbell
09-19-2003, 07:46 PM
I don't know how I've never seen this thread before, but man! Really damn impressive with what you guys have done with it *claps*
buggedcom
09-20-2003, 07:29 AM
ThunderOne, try using the latest version found here (http://www.buggedcom.co.uk/forum/downloads.php?view=detail&id=2). It is the most stable version, although one or two minor bugs. Version 8 was eons ago and even i have forgot how it works..
colin14, cheers man. :D
ThunderOne
09-21-2003, 12:27 AM
Bugged I PM'ed you through this thread check it out I almost have version 8 working perfect for now I will play with the fancy version later check your private message!! Thanks.
buggedcom
12-10-2003, 08:17 AM
Here is an mxp download of the iW 2.0.0.b13 pre beta release. The aesthetics of the release are just what i have been working with, they are not indicative of what will be in the final release.
One feature is missing, the dynamic link back url generator and so are the html templates for this, however everything else is operational. NOTE : that the interfaces read 1.5.0 but they will be changed to 2.0.0 + the build number. You will also be able to check the build version on each component for updates eventually.
Also note that currently only php is supported for dynamic galleries. Eventually i think i will remove dynamic galleries, for database interaction as i have encountered several problems with dynamic galleries although they have been successfully hacked, but it's not very pretty.
Also there is a scroll error when using vertical jump scrolling in the thumbnails
http://www.buggedcom.co.uk/forum/downloads.php?view=detail&id=12
ToddziLLa
02-17-2004, 04:45 PM
I know this is all web-oriented...but answer me this;
How well do you think this would run if I export a .exe file and throw it on a CD with an autorun file on it?
I am also going to throw 2 more codes in the beginning of the code to;
1) disable the right-click options (I don't like when people can do that :p ) and
2) insert a code that would make the file run at full screen no matter what size monitor they have.
What are your guys' thoughts on this? I haven't tried any of this yet, but will when more time comes around. So much time, so little to do. (being sarcastic, of course :) )
buggedcom
02-18-2004, 08:30 PM
should be fine i rekon, but you are aware that it's not 100% bug free aren't you? Still works great, just one or two of the extra features are a little quirky
lightmode
03-02-2004, 01:39 PM
First of all...Ridiculously Awesome gallery scripting, works awesome, after I gave myself a few mnutes to figure out your directory settings, I had great results. I am using this for a site right now and ran into a problem. Each of the nine or so areas of my site are in individual scenes. When you go to "photo gallery" it loads awesome, and until I put
on release unLoad("empty") on every button it stayed permanently.
Now the problem I am having is when you go to another area and then come back it is just sort of stuck. Let me make that clearer:
I am on "home" scene and then I go to "photo gallery" scene(works great so far) then I goto "pricing" scene( unloads good) and then I return to "photo gallery" scene and it fails to load (The box and thmbnl box show up with empty progress bars) like it needs some kind of refresh script at the header of that scene or something. I maybe need somesort of if - else situation there. Please help, I have an otherwise perfect use for your brilliant scripting...
lightmode
03-02-2004, 01:46 PM
The other thing I forgot to mention is that this problem does not occur in a publish preview(html) situation, only once I post to the web.
marco_polo7000
03-02-2004, 06:20 PM
I just downloaded the beta version from this link:
http://www.buggedcom.co.uk/forum/do...etail&id=12
and I am having trouble opening it. It is an mxp file right? When I try that, the MM extension manager says it is invalid or I need to update it. I am running Flash MX 2004. I also tried opening as a zip file which did not work. Does anyone have any suggestions?
thanks in advance.
buggedcom
03-05-2004, 08:42 PM
do you have the site live, so i could take a loook lightmode?
as per the download it is an mxp, make sure you have extension manager 1.6
lightmode
03-06-2004, 05:48 AM
www.irvingcommons.com - Go to photo gallery, let it load completely, then go to another page like profile, then go back to photo gallery. I put the load image gallery button on the photo gallery page as an attempt to fix the problem, it does the same thing eaither way, I was using an unload movie "empty" on the release of the photogallery button coming from any other page. the "load gallery images" button gave me a fram to rest at before the "empty" thing loaded. I love your gallery interface I am just scratching my head as to why this does this especially because it works better when i am in preview mode, do you think it is the cache thing???
buggedcom
03-06-2004, 09:47 PM
****... a one meg swf and no preloader..... hmm maybe rethink that one.
ermmm i see you not actually using the component, rather the prototype is this correct? If so the only way to remove the entire gallery would be to have the gallery as a seperate swf and then load that into the main swf. to get rid of the gallery simply then hide the mc that the gallery swf was loaded into as apposed to removing it. that way the end user will not have to load the thumbs more than once.
failing that, just use the imageweaver component, link in my sig. basically because the prototype is really buggy, that's not saying that the component doesn't have bugs, but it has far less than the original prototype as functions well
lightmode
03-06-2004, 10:47 PM
Your component works wonderfully, everyone loves it, you just have to hit refresh if you leave from that area and then want to come back. I tried your load separate .swf idea, no go, same diagnosis. I am working on a "growing tree" preloader right now, forgot to do that earlier on in the process...
buggedcom
03-07-2004, 09:24 AM
but you're not using the component are you. it looks like you're using the prototype code. don't you have an example with the component in it?
napofan58
06-18-2004, 01:20 PM
ok, all of this is new to me, can someone please tell me, where to start, so I won't be so lost when it comes to the gallery. I have a template that I am working on, I want to insert a photo gallery, what should I do to make this happen. Should I try to create a gallery in another program, or should I just work inside the template? Please help me.
d-rail-2002
07-05-2004, 04:49 AM
Hey! Well, this is the second year I've used your wonderful tool. Here's the updated websites I'm using it on:
http://www.wildinthewoods.com
http://www.wildinthewinter.com
ah... it's so easy to RTFM.
ANYWAY... hey Bugged- when are you going to release a version compatible with Flash MX 2004? I'm not complaining too much- the price is nice. :)
Thanks for all your hard work.
alflashy
10-05-2004, 07:32 PM
this is what i was looking for but not working for me
it always give me this error while loading images
Error opening URL "file:///C|/Documents%20and%20Settings/Al/Desktop/loadjpg/thumbnails/images_1.jpg
not sure why
thanks
d-rail-2002
10-05-2004, 09:30 PM
You will get that error if you test it locally. You need to upload it to your server, then test it remotely.
alflashy
10-05-2004, 10:54 PM
no i tried on uploding
and the path in the error is the perfect path to the image
buggedcom
10-06-2004, 12:34 AM
This is because you have entered some information into either the interface or text files wrong. upload the files to a server somewhere and i'll see if i can see what's wrong
buggedcom
10-08-2004, 02:17 AM
are you sure the pictures aren't progressive jpegs?
cyberrus
10-09-2004, 02:26 AM
how 'bout your website - i've tried to dl your component but the browser turned back an error?
buggedcom
10-11-2004, 01:06 AM
sorry about that, I've been updating my site and some off the files have changed, I have now updated my sig and corrected the file error so click away. :)
alflashy
10-27-2004, 06:36 PM
hi
now i have everything working except the image preloader.
i look through all the post by buggedcom on all the forum but no body has this issue - why me?
I can see the images but the main image preloader just show the outline and then after some time image apear on the screen
i using photogallery_v8 AND V9
still bother.
please help
thanks
buggedcom
10-28-2004, 12:37 AM
I have repeatedly been asked about bugs in the component in my forum. And i keep pointing out using earlier versions of the component is like using beta software, it doesn't always work properly. use the latest version only and i will support that. for the latest version check my sig.
buggedcom
11-23-2004, 05:58 PM
version 2 final beta is ready for downloading, however i haven't put together a demo setup yet, you guys are on your own for a little. i need some sleep
http://www.buggedcom.co.uk/forum/dload.php?action=file&file_id=20
arafuse
05-19-2005, 01:17 AM
very cool!
Just what I have been searching for. Very easly explained! It looked a bit scary at first where there is a lot of code, but ended up being a breeze.
I would never know where to begin to write a code like that, thanks for your contribution.
buggedcom
05-19-2005, 10:08 AM
you should note that although you can use this code, wou should use the imageWeaver Flash Component System that i have created for creating galleries. version 2 is still in beta but is stable enough for production sites. check my sig for links
Eliomys
09-26-2005, 08:39 PM
Hey buggedcom & everybody else around, ...
The *AWSOME* script works great, ... I´ve used it a couple of times in my website...
Only catch is, on my computer it worked like a charm, ... in real live internet, it only seems to catch on the second time a visitor looks at the page.
Weirder is that some pages sometimes work ok, ...
The pages can be seen & the .fla files can be downloaded at:
http://www.kevie.be/hardel.html
http://www.kevie.be/naturbeheer.html
http://www.kevie.be/beemden.html
http://www.kevie.be/hardel.fla
http://www.kevie.be/naturbeheer.fla
http://www.kevie.be/beemden.fla
Startsite is of course: De Kevie (http://www.kevie.be/index.html)
If anybody could give me a hand, I´d be much obliged!
Thanks,
David
piratefish
09-27-2005, 03:12 AM
It's truly amazing, but I'm just wondering why? Did you really have nothing to do for 5 days that you spent your time on this work of art?
You are truly on a level which I pray I may attain one day. Congratulations and in fact it's better than nasal hair trimmers (when was the last time you saw those things cue up a photo?)
buggedcom
09-27-2005, 07:53 AM
It worked fine the first time i visited the page as far as i could tell. mac, safari. However I should note that the protogallery was written well over 3 / 3 and half years ago and has been succeeded by the imageWeaver component set. Due to the age of the protoGallery i no longer support it. however i do support imageWeaver. See the links in my sig.
The reason it took me five days to write was because i was a novice programmer and basically i was writing it whilst on holiday in australia and i was enjoying the sun, sand and sea at the same time :D
goliatone
01-10-2006, 12:03 PM
tnxs 4 sahring...nice code, it will be really worth to have a look...
farafiro
01-16-2006, 04:31 AM
this is very strange
i've unsubscribed from this thread 3 times now and i still get notifications with every new post
bhavana
07-18-2006, 09:45 AM
hi
please give me some animations to make a flash i m making web site so i m used flash in my web site so plese give me same examples
please send mein my i d bhavanaemailme@gmail.com ok
igve me some sites plese give me idea
thanks
farafiro
07-18-2006, 09:56 AM
bhavana
welcome to the forums
I don't understand what u want, and why u didn't post it in a new post
mooska
07-18-2006, 10:07 AM
... and why did you pm me and probably many others with this same post ... :)
farafiro
07-18-2006, 11:21 AM
lol
me as well, I think he/she PMed all the members onlune members
;)
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.