View Full Version : Howd he do this? Resizing slideshow
scotty
October 10th, 2005, 04:56 PM
From the bottom centre?
scotty(-:
Furpants
October 11th, 2005, 12:04 AM
Yes, from the bottom centre.
scotty
October 11th, 2005, 02:33 PM
In the border mc put the registration point in the bottom centre (you only have to change the y value) and change one line in the resizeMe function
MovieClip.prototype.resizeMe = function(w, h, id) {
var speed = 3;
container._alpha = 0;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
container._x = this._x-this._width/2+spacing/2;
//next line has changed
container._y = this._y-this._height+spacing/2;
info._y = Math.round(this._y+this._height/2+spacing/2);
container._alpha += 5;
if (container._alpha>90) {
info.text = id;
container._alpha = 100;
delete this.onEnterFrame;
}
}
};
};
scotty(-:
Furpants
October 11th, 2005, 05:38 PM
How do I adjust where the y axis falls?
Thanks!
Furpants
October 11th, 2005, 05:42 PM
I figured it out, Scotty. Thanks for humoring me.
scotty
October 11th, 2005, 05:43 PM
no problem =)
Hobo13
October 18th, 2005, 10:48 AM
I'm using the V3_with_thumbs, I haven't changed anything in the code so far. However, I am unable to get the textfield to operate properly. I would like to put more than a "title" in the text field, rather a a few sentences. I've gone through the code looking for everything that would pertain to the textfield but I am thus far unsuccessful.
Whenever I add more than a few words to the textfield it simply cuts off at a certain point. Additionally if I resize the textfield it stretches the words to match rather than wrapping (multiline is selected), if I delete and recreate the textfield, text does not appear, although I can trace the text.
Any ideas?
(PS - Scotty I have no idea how you have the patience to answer all of these questions, it's amazing)
Edit: Nevermind, deleting and recreating the textfield did work this last time that I tried it. Disregard my nonsense.
LazyFish
October 18th, 2005, 09:27 PM
greetings to all flashmasters :)
look i no its a bit different but i am trying center the images im loading in my gallery.
but i created my gallery following this (http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm)
I read nearly 10pages of this thread it looks like maybe someone here may know the answer.
Please my gallery looks horrible like this (not aligned to center position)
Thx in advance
LF
LazyFish
October 19th, 2005, 07:08 AM
Still no answers even in this thread!!
Please help :D
scotty
October 19th, 2005, 08:48 AM
@Hobo13: glad you've figured it out :)
@LazyFish: http://www.kirupa.com/forum/showthread.php?t=184069 post #2
scotty(-:
LazyFish
October 19th, 2005, 03:10 PM
@Hobo13: glad you've figured it out :)
@LazyFish: http://www.kirupa.com/forum/showthread.php?t=184069 post #2
scotty(-:
scotty!! you are like 'the Yoda' sent to this forums from the macromedia galaxy
thanx alot
and respect :)
scotty
October 20th, 2005, 03:56 AM
you're welcome =)
jojomcbobo
October 20th, 2005, 10:12 PM
I know its been mentioned before, but the code i've found doesnt seem to work on my version, i'm looking to make a version thats an auto slideshow that cycles through pics every x seconds. I also want to add prev next buttons.
here's the codebase im using (which is genius btw,thanks very much for this)
code:
var tnNr;
spacing = 10;
container._alpha = 0;
var curLength;
MovieClip.prototype.loadPic = function(pic, id) {
info.text = "";
this._alpha = 0;
this.loadMovie(pic);
temp = this._parent.createEmptyMovieClip("temp2", 998);
temp.onEnterFrame = function() {
var t = container.getBytesTotal(), l = container.getBytesLoaded();
if (Math.round(l/t) == 1 && container._width != 0 && container._height != 0) {
var w = container._width+spacing, h = container._height+spacing;
border.resizeMe(w, h, id);
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.resizeMe = function(w, h, id) {
var speed = 3;
container._alpha = 0;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
container._x = this._x-this._width/2+spacing/2;
container._y = this._y-this._height/2+spacing/2;
info._y = Math.round(this._y+this._height/2+spacing/2);
container._alpha += 5;
if (container._alpha>90) {
info.text = id;
container._alpha = 100;
delete this.onEnterFrame;
}
}
};
};
function galleryChoice(q) {
pArray = new Array();
tArray = new Array();
iArray = new Array();
my_xml = new XML();
for (var j = 0; j<curLength; j++) {
this.th_nav["thmb"+j].removeMovieClip();
}
my_xml.ignoreWhite = true;
my_xml.onLoad = function(loaded) {
if (loaded) {
gallery = this.firstChild.childNodes[q];
curLength = gallery.childNodes.length;
for (var i = 0; i<gallery.childNodes.length; i++) {
pArray.push(gallery.childNodes[i].attributes.source);
tArray.push(gallery.childNodes[i].attributes.thumb);
iArray.push(gallery.childNodes[i].attributes.title);
}
}
delay = setInterval(makeButtons, 50);
};
my_xml.load("gallery.xml");
}
function makeButtons() {
tnNr = 0;
clearInterval(delay);
for (var i = 0; i<tArray.length; i++) {
var thb = th_nav.thmb.duplicateMovieClip("thmb"+i, 1000+i);
thb.id = i;
thb._x = i%15*48;
thb._y = Math.floor(i/15)*48;
}
loadButtons();
}
function loadButtons() {
var tbox = th_nav["thmb"+tnNr].box;
tbox.loadMovie(tArray[tnNr]);
temp = this.createEmptyMovieClip("tmp"+tnNr, 999);
temp.onEnterFrame = function() {
bt = tbox.getBytesTotal();
bl = tbox.getBytesLoaded();
if (bt == bl && bt>4) {
nextButton();
delete this.onEnterFrame;
}
};
}
function nextButton() {
if (tnNr<tArray.length-1) {
tnNr++;
loadButtons();
} else {
activateButtons();
}
}
function activateButtons() {
mainButtons();
for (var i = 0; i<pArray.length; i++) {
var but = th_nav["thmb"+i];
but.id = i;
but.onRelease = function() {
container.loadPic(pArray[this.id], iArray[this.id]);
disButtons2(this.id);
};
}
container.loadPic(pArray[0], iArray[0]);
disButtons2(0);
}
butArray = new Array();
butArray = ["gal1_btn", "gal2_btn", "gal3_btn", "gal4_btn"];
function mainButtons() {
for (var i = 0; i<butArray.length; i++) {
this[butArray[i]].id = i;
this[butArray[i]].onRelease = function() {
galleryChoice(this.id);
disButtons(this.id);
};
}
}
function disButtons2(d) {
for (var i = 0; i<tArray.length; i++) {
if (i != d) {
this.th_nav["thmb"+i].enabled = 1;
this.th_nav["thmb"+i].box._alpha = 100;
} else {
this.th_nav["thmb"+i].enabled = 0;
this.th_nav["thmb"+i].box._alpha = 30;
}
}
}
disButtons(0);
galleryChoice(0);
Hobo13
October 21st, 2005, 12:13 AM
Another day, another question...it would seem.
Working from v3 multiple galleries, I am unable to figure out how to get flash to load from txt files after loading the initial xml file, ala this tutorial: here (http://www.kirupa.com/web/xml/examples/portfolio.htm). All my attempts have either loaded the link as the "text" or given me an "undefined". While it is not wholly crucial to be able to do this, it would sure organize things a lot better than having all the text directly in the XML file itself.
function galleryChoice(q) {
//Loads XML Gallery
pArray = new Array();
tArray = new Array();
iArray = new Array();
my_xml = new XML();
for (var j = 0; j<curLength; j++) {
this.th_nav["thmb"+j].removeMovieClip();
}
my_xml.ignoreWhite = true;
my_xml.onLoad = function(loaded) {
if (loaded) {
gallery = this.firstChild.childNodes[q];
curLength = gallery.childNodes.length;
for (var i = 0; i<gallery.childNodes.length; i++) {
//Adds pictures, thumbnails, description to array
pArray.push(gallery.childNodes[i].attributes.source);
tArray.push(gallery.childNodes[i].attributes.thumb);
iArray.push(gallery.childNodes[i].attributes.description);
}
}
delay = setInterval(makeButtons, 50);
//Creates the buttons, every 50 milliseconds
};
my_xml.load("updated gallery.xml");
}
Thank you for your time.
logand
October 27th, 2005, 02:18 PM
I have a question about the resize_shadow. How can i take out just the thumbnails and leave only the back and next buttons?
sipher
October 27th, 2005, 08:07 PM
with all this galleries it would be nice to be able to create one photogallery + slide show something like the one here
http://www.deluxeinc.com/explorations/rgbfade01.htm
that'll be cool to try to do ... just an idea :tb:
Floppy
November 6th, 2005, 07:01 PM
reset=getTimer();
main = new XML();
main.ignoreWhite = true;
main.load("quotes.xml");
_level0.quotes._alpha=0;
main.onLoad = function(ok) {
if (ok) {
cucu = function(k){
num=k;
wasreset=false;
_level0.quotes._alpha=0;
_level0.quotes._xscale=10;
_level0.quotes._yscale=10;
_level0.quotes.pic.loadMovie(_root.main.firstChild .childNodes[k].firstChild)
onEnterFrame = function() {
if (!wasreset){reset=getTimer(); wasreset = true;}
if (getTimer()-reset>=1000) {_level0.quotes._alpha+=(100-_level0.quotes._alpha)/25;
_level0.quotes._xscale+=(100-_level0.quotes._xscale)/25; _level0.quotes._yscale+=(100-_level0.quotes._yscale)/25;
};if (getTimer()-reset>=14000) {_level0.quotes._alpha+=(0-_level0.quotes._alpha)/7; _level0.quotes._xscale+=(125-_level0.quotes._xscale)/6; _level0.quotes._yscale+=(125-_level0.quotes._yscale)/6;}
if (getTimer()-reset>=timp) { if (num>=1) {
cucu(num-1);} else {cucu(quotesEntries-1);}
reset = getTimer();}
}}}
var quotesSection = this.firstChild;
var quotesEntries = quotesSection.childNodes.length;
timp=15000;
wasrest=false;
onEnterFrame = function() {if (getTimer()-reset>1200 && !wasreset ) {
cucu(quotesEntries-1);
wasreset=true
}}}
stop();
basically this should work... i used the code to make a quote slideshow and made a small modification... not very well formatted code, sorry...
sipher
November 6th, 2005, 08:47 PM
i found this code here http://www.after-hours.org/foro/viewtopic.php?t=1982
problems is it doesnt seen to work for some reason is not loading anything
var doc:XML = new XML();
doc.load("imagelib_dark.xml");
doc.ignoreWhite = true;
doc.onLoad = initSlideShow;
function initSlideShow()
{
imgID = -1;
images = doc.firstChild.childNodes;
imgLen = images.length;
slideShowID = setInterval(slideShow, 95000);
slideShow();
autoplaymc.gotoAndStop(2);
} // End of the function
function autoPlay()
{
slideShowID = setInterval(slideShow, 5000);
slideShow();
autoplaymc.gotoAndStop(2);
} // End of the function
function stopAutoPlay()
{
clearInterval(slideShowID);
autoplaymc.gotoAndStop(1);
} // End of the function
function next()
{
stopAutoPlay();
slideShow();
} // End of the function
function previous()
{
stopAutoPlay();
slideShowBack();
} // End of the function
function slideShow()
{
imgID++;
if (imgID >= imgLen)
{
imgID = 0;
} // end if
imgCage.fade("out", images[imgID].attributes.src);
trace("imgID = " + imgID);
} // End of the function
function slideShowBack()
{
imgID--;
if (imgID < 0)
{
imgID = imgLen - 1;
} // end if
imgCage.fade("out", images[imgID].attributes.src);
trace("imgID = " + imgID);
} // End of the function
function preload(file)
{
loadMovie(path + file, imgCage.holder);
imgCage.onEnterFrame = function ()
{
tkb = this.holder.getBytesTotal();
lkb = this.holder.getBytesLoaded();
p = Math.round(lkb / tkb * 100);
if (!isNaN(p))
{
percentage = p;
if (lkb == tkb && p > 99)
{
percentage = "";
this.fade("in");
} // end if
} // end if
};
} // End of the function
getURL("FSCommand:allowscale", false);
stop();
_quality = "low";
MovieClip.prototype.initFade = function ()
{
this.col = new Color(this);
this.trans = new Object();
this.trans.rb = this.trans.gb = this.trans.bb = 255;
this.col.setTransform(this.trans);
this.rc = 255;
this.gc = 255;
this.bc = 255;
this.nrc = 0;
this.ngc = 0;
this.nbc = 0;
};
MovieClip.prototype.fade = function (dir, file)
{
this.rs = 4;
this.gs = 4;
this.bs = 4;
this.rdone = false;
this.gdone = false;
this.bdone = false;
if (dir == "in")
{
this.nrc = 0;
this.ngc = 0;
this.nbc = 0;
}
else if (dir == "out")
{
this.nrc = 255;
this.ngc = 255;
this.nbc = 255;
} // end if
this.onEnterFrame = function ()
{
if (this.nrc < this.rc - this.rs)
{
this.rc = this.rc - this.rs;
}
else if (this.rc + this.rs < this.nrc)
{
this.rc = this.rc + this.rs;
}
else
{
this.rc = this.nrc;
this.rdone = true;
} // end if
if (this.ngc < this.gc - this.gs)
{
this.gc = this.gc - this.gs;
}
else if (this.gc + this.gs < this.ngc)
{
this.gc = this.gc + this.gs;
}
else
{
this.gc = this.ngc;
this.gdone = true;
} // end if
if (this.nbc < this.bc - this.bs)
{
this.bc = this.bc - this.bs;
}
else if (this.bc + this.bs < this.nbc)
{
this.bc = this.bc + this.bs;
}
else
{
this.bc = this.nbc;
this.bdone = true;
} // end if
if (this.rdone && this.gdone && this.bdone)
{
if (dir == "out")
{
preload(file);
}
else
{
delete this["onEnterFrame"];
} // end if
} // end if
this.trans.rb = -this.rc;
this.trans.gb = -this.gc;
this.trans.bb = -this.bc;
this.col.setTransform(this.trans);
};
};
imgCage.initFade();
path = "";
EL CODIGO DEL XML ES:
<?xml version="1.0" ?>
<imagelib>
<picture src="images_dark/dark001.jpg" w="400" h="500" preloaded="false" />
<picture src="images_dark/dark002.jpg" w="400" h="500" preloaded="false" />
<picture src="images_dark/dark003.jpg" w="400" h="500" preloaded="false" />
<picture src="images_dark/dark004.jpg" w="400" h="500" preloaded="false" />
<picture src="images_dark/dark006.jpg" w="400" h="500" preloaded="false" />
<picture src="images_dark/dark007.jpg" w="400" h="500" preloaded="false" />
<picture src="images_dark/dark008.jpg" w="400" h="500" preloaded="false" />
<picture src="images_dark/dark009.jpg" w="400" h="500" preloaded="false" />
</imagelib>
3f02mach
December 6th, 2005, 03:01 PM
I hope someone can lend me a hand. I am using the v3_thumbs_scrolled version and I have two questions...
1. Has anyone successfully added the previous & next buttons to this version?
2. Has anyone been able to incorporate an auto-play slideshow into this version?
What I am trying to do is add the previous & next buttons, and add a 'Play Slideshow' button that would play all of the images in the gallery automatically.
If anyone could point me in the right direction, or show me some sample AS that works, I would be VERY VERY grateful. Thanks!
pete_zahut
December 10th, 2005, 02:43 PM
Hi,
I created the gallery with multiple galleries, check it out here (http://cmdstud.khlim.be/~jcornelissen/JC/jc_v3.html)
The different galleries are the different buttons, but how can I add a little more candy to the buttons?
They are all duplicated of one dummy MC like so:
if (success) {
var galleries = this.firstChild.childNodes;
//_root.gal_length = galleries.length;
for(var i=1;i<galleries.length;i++) {
var gallery = galleries[i];
duplicateMovieClip(dmyBut,"but"+i,100+i);
_root["but"+i].txt.text = gallery.attributes.name
_root["but"+i]._x = 5;
_root["but"+i]._y = 10 + i*20;
var btn = _root["but"+i];
btn.id = i;
btn.onRelease = function() {
galleryChoice(this.id);
}
btn.onRollOVer = function() {
btn.gotoAndPlay(2);
}
}
galleryChoice(0);
} else {
title_txt.text = "Error!";
}
As you can see the btn.OnRollOver doesn't work...
:h:
If you need the .fla just ask ;)
scotty
December 10th, 2005, 06:51 PM
Try
if (success) {
var galleries = this.firstChild.childNodes;
for (var i = 1; i<galleries.length; i++) {
var gallery = galleries[i];
var btn = dmyBut.duplicateMovieClip("but"+i, 100+i);
btn.txt.text = gallery.attributes.name;
btn._x = 5;
btn._y = 10+i*20;
btn.id = i;
btn.onRelease = function() {
galleryChoice(this.id);
};
btn.onRollOver = function() {
this.gotoAndPlay(2);
};
}
galleryChoice(0);
} else {
title_txt.text = "Error!";
}
In the rollover function you can refer to btn with 'this' :)
scotty(-:
pete_zahut
December 11th, 2005, 03:38 AM
Thx Scotty!
But I had to addept it to this:
...
btn.id = i;
btn.title = gallery.attributes.name;
btn.onRelease = function() {
galleryChoice(this.id);
}
btn.onRollOVer = function() {
this.gotoAndPlay(2);
this.txt.text = this.title;
}
btn.onRollOut = function() {
this.gotoAndPlay(1);
this.txt.text = this.title;
}
...
I had to put in the title variable, because otherwise it would just "forget" my title! :thumb2:
Respect, Pete
scotty
December 11th, 2005, 09:37 AM
welcome =)
amy
December 20th, 2005, 01:24 AM
I hope someone can lend me a hand. I am using the v3_thumbs_scrolled version and I have two questions...
1. Has anyone successfully added the previous & next buttons to this version?
2. Has anyone been able to incorporate an auto-play slideshow into this version?
What I am trying to do is add the previous & next buttons, and add a 'Play Slideshow' button that would play all of the images in the gallery automatically.
If anyone could point me in the right direction, or show me some sample AS that works, I would be VERY VERY grateful. Thanks!
Hey all,
I've been digging around for an answer to this one myself. The V3 with multi gallerys AND thumbs is so near perfect that I'm ashamed to ask for more - but if I could add the prev and next buttons... I'd be thrilled.
Thanks in advance
flashwillkill
December 25th, 2005, 06:51 AM
Hello Kirupians,
Hopefully this question is not too specific?
I have this from scotty's outstanding gallery V3 with thumbs.
butArray = new Array();
butArray = ["gal1_btn", "gal2_btn", "gal3_btn", "gal4_btn"];
function mainButtons() {
for (var i = 0; i<butArray.length; i++) {
this[butArray[i]].id = i;
this[butArray[i]].onRelease = function() {
galleryChoice(this.id);
disButtons(this.id);
};
}
}
As I have a mask/animation playing before each section,
I would like to "delay" the galleryChoice(this.id); and change the
content of th_nav a tiny bit later.
This is what I got so far (using an interval), but the script does
not recognize the this.id.
How can I load the correct gallery if I delay it? How would I refer to this.id then?
Is it possible and more important, how?
Does anyone have a clue? Thanks in advance ;) ... and Merry Christmas!
function delayLoad() {
galleryChoice(this.id);
clearInterval(blend);
}
blend = setInterval(delayLoad, 2000);
scotty
December 25th, 2005, 12:59 PM
Did you try
blend = setInterval(this,"delayLoad", 2000);
?
scotty(-:
scotty
December 25th, 2005, 01:04 PM
Hey all,
I've been digging around for an answer to this one myself. The V3 with multi gallerys AND thumbs is so near perfect that I'm ashamed to ask for more - but if I could add the prev and next buttons... I'd be thrilled.
Thanks in advance
Maybe this post will help ?
http://www.kirupa.com/forum/showpost.php?p=510622&postcount=241
scotty(-:
flashwillkill
December 25th, 2005, 04:13 PM
Did you try
blend = setInterval(this,"delayLoad", 2000);
?
scotty(-:
I did now ;) but did not work.
On a second look, it starts doing what is specified in the
disButtons(this.id);
... but I have to press the butt again for it to disable the butt
and finish the galleryChoice thingy?
Any other secret code and wise suggestion?
Meanwhile, let me take a third look and I'll be back :thumb:
scotty
December 26th, 2005, 01:38 AM
LOL, you're right, it's because this.id isn't defined, try
butArray = new Array();
butArray = ["gal1_btn", "gal2_btn", "gal3_btn", "gal4_btn"];
function mainButtons() {
for (var i = 0; i<butArray.length; i++) {
var btn = this[butArray[i]];
btn.id = i;
btn.onRelease = function() {
blend = setInterval(delayLoad, 2000, this.id);
disButtons(this.id);
};
}
}
function delayLoad(g) {
galleryChoice(g);
clearInterval(blend);
}
scotty(-:
flashwillkill
December 26th, 2005, 11:50 AM
OMG, beautiful, absolutely beautiful.
Thank you :love:
Hallama@earthli
December 29th, 2005, 04:26 PM
I'm using a 'slideshow' format for my portfolio. It works fine as its own .swf file, but when I use 'loadMovie' into a containerMC, I lose the functionality of the slideshow. (please see attached files).
I'm pretty sure it's just a _root or _parent problem in the AS.
The slideshow is also loading the images through a .xml file. But the images still show up, just not the resizable function.
You can open the port_print.swf to see how it should work, and then compare it to what happens when it loads in the main .swf.
*only the first button (yosemite) is working for now, to decrease file size.
Thanks, Flash brothers and sisters.
file is at: http://homepage.mac.com/hallvalla/problem.zip
scotty
January 1st, 2006, 08:12 AM
OMG, beautiful, absolutely beautiful.
Thank you :love:
welcome ;)
fuzzyfluid
January 6th, 2006, 01:25 AM
hi, wondering what the final outcome was in this? lol i stopped reading about page 17.
im adjusting code that was on page 1-5, im dynamically loading images from a folder -- the only problem i seem to have is that the photo loads and appears before the border/frame is adjusted. Once the border is adjusted, the image just shifts into the middle of the border.
ah -- well, wanted to add to this big book of scotty.
debnajm
January 6th, 2006, 02:49 AM
Hi,
I have spent the last 3 days reviewing all of this thread, so I wouldn't have to post. However, I am just stuck, so I am sorry to bother with this dumb question.
I am using the resizeborder_v3.fla and have just changed the code to point to my xml file.
However, the problem is, only one of my pictures load, I think this is really silly error on my part, but I can't find it.
I have attached my files.
Would someone mind helping me?
40Unregistered
January 6th, 2006, 10:56 AM
i want to help.
sorry, cant open it: "unexpected format". i use mx 2004.
paste your code here, it would help others help u
here i've modified the resizeborder gallery (http://usher.dibaride.com)
debnajm
January 6th, 2006, 04:21 PM
i want to help.
sorry, cant open it: "unexpected format". i use mx 2004.
paste your code here, it would help others help u
here i've modified the resizeborder gallery (http://usher.dibaride.com)
I have attached MX 2004 version, I am using 8.
Here is the code:
spacing = 10;
containerMC._alpha = 0;
var pArray = new Array();
var tArray = new Array();
var cur = 0;
MovieClip.prototype.loadPic = function(pic) {
cur = pic;
containerMC._alpha = 0;
this.loadMovie(pArray[pic]);
this._parent.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
bar._visible = 1;
per = Math.round((l/t)*100);
if (t == l && containerMC._width>0 && containerMC._height>0) {
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h);
bar._visible = 0;
picinfo.info.text = tArray[pic];
containerMC._alpha = 0;
delete this.onEnterFrame;
} else {
bar._width = per;
picinfo.info.text = per+" % loaded";
}
};
};
MovieClip.prototype.resizeMe = function(w, h, pic) {
var speed = 3;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
nav._x = Math.round(this._x-this._width/2);
nav._y = Math.round(this._y+this._height/2+spacing/2);
prevb._x = nav._x-5;
nextb._x = nav._x+this._width+5;
nextb._y = prevb._y=this._y-this._height/2;
picinfo._y = nextb._y-5;
picinfo._x = border._x-picinfo._width/2;
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
containerMC._x = this._x-this._width/2+spacing/2;
containerMC._y = this._y-this._height/2+spacing/2;
containerMC._alpha = 100;
delete this.onEnterFrame;
}
};
};
var gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function(success) {
if (success) {
var gallery = this.firstChild;
gallery_txt.text = gallery.attributes.info;
for (var i = 0; i<gallery.childNodes.length; i++) {
tArray.push(gallery.childNodes[i].attributes.title);
pArray.push(gallery.childNodes[i].attributes.source);
}
containerMC.loadPic(0);
} else {
title_txt.text = "Error!";
}
};
gallery_xml.load("gallery_frostbite2.xml");
prevb.onRelease = function() {
cur--;
if (cur<0) {
containerMC.loadPic(pArray.length-1);
} else {
containerMC.loadPic(cur);
}
};
nextb.onRelease = function() {
cur++;
if (cur>pArray.length-1) {
containerMC.loadPic(0);
} else {
containerMC.loadPic(cur);
}
};
And here is the code for the thumbnails:
on (release) {
this._parent.containerMC.loadPic(0);
}
on (rollOver) {
overtxt.text = this._parent.tArray[0];
}
on (rollOut) {
overtxt.text = "";
}
scotty
January 7th, 2006, 02:36 AM
Check if your jpgs are of a non-progressive format
scotty(-:
debnajm
January 7th, 2006, 06:23 PM
Check if your jpgs are of a non-progressive format
scotty(-:
Hi Scotty,
Checked on the format and exported and saved over all the files with the progressive option unchecked.
:(
scotty
January 8th, 2006, 06:32 AM
Can you post 2 pictures as well?
scotty(-:
debnajm
January 8th, 2006, 02:14 PM
Can you post 2 pictures as well?
scotty(-:
Thank you so much for this...here you go...
I used the thumbnails, bc even zipped the two larger files exceeded the limit..
scotty
January 8th, 2006, 04:18 PM
The problem is in your xml, you've no forward slash (/) at the end of your nodes, it should read
<image source="LargeScale/Catwalk_Finale_side_-photo_Tim_Trace.jpg" title="Catwalk Finale, photo: Tim Trace" thumb="SmallScale/Catwalk_Finale_side_-photo_Tim_Trace.jpg"/>
for each node
scotty(-:
debnajm
January 8th, 2006, 06:56 PM
[quote=scotty]The problem is in your xml, you've no forward slash (/) at the end of your nodes, it should read
<image source="LargeScale/Catwalk_Finale_side_-photo_Tim_Trace.jpg" title="Catwalk Finale, photo: Tim Trace" thumb="SmallScale/Catwalk_Finale_side_-photo_Tim_Trace.jpg"/>
for each node
scotty(-:ote]
Thank you, I knew it was some silly thing. I thought I really examined the XML.
Is there some other step I have to take to get the thumbnails to load?
Deb
flashwillkill
January 10th, 2006, 06:21 AM
Hello again,
Wondering if someone is able to help.
I am trying to dynamically create the main gallery buttons with the "gallery name" from the xml.
What I achieved and works perfect so far is:
mainGal_btn.galleryInfo.text = this.firstChild.childNodes[q].attributes.name;
Now I want to dublicate my btn to replace the gal1_btn, gal2_btn etc.
From thread #771 I got some kind of clue:
if (success) {
var galleries = this.firstChild.childNodes;
for (var i = 1; i<galleries.length; i++) {
var gallery = galleries[i];
var btn = mainGal_btn.duplicateMovieClip("but"+i, 100+i);
btn.galleryInfo.text = this.firstChild.childNodes[q].attributes.name;
btn._x = 5;
btn._y = 10+i*20;
btn.id = i;
btn.onRelease = function() {
galleryChoice(this.id);
};
btn.onRollOver = function() {
this.gotoAndPlay(2);
};
}
galleryChoice(0);
} else {
title_txt.text = "Error!";
}
Yet, how do I incorporate that within my exsisting onLoad.function???
Or do I have to replace the mainButtons()function with that code :hair: .
Hmm, ... Maybe someone is able to give me a hint. Thanks in advance.
fancythis
January 10th, 2006, 01:32 PM
Hi all- I have a small problem, not sure why. When i preview the gallery on mx 2004 and on frontpage it works ok. But when I upload it to the site it only loads the top row of pictures.
http://img403.imageshack.us/img403/127/gallery6ls.jpg
jasmine
January 21st, 2006, 01:05 PM
hello, there are a ton of wonderful photo galleries on kirupa - so thank so much to scotty and all the geniuses that contrubuted!
i have searced every where on the forum and cannot figure it out myself. i want to have a photo galler similar to:
The gallery with a solid _y position
resize_height zip
but i want it with a solid x position (example all the photos are the same height and are left flush, and only the border on the right side moves) - and is there are way for this to just play like a slideshow (instead of clicking a next button)?
this is probably simple to everyone else - but i really need help!
thank you so much!
jasmine
apt d
January 21st, 2006, 04:07 PM
Hey guys, This thread is so huggge, but great information in it.
I have somewhat of a simple question, but fo rsome reason I can't come up with a solution.
I am displaying a portfolio, and in that I have web work. Well, I want a launch page link or button or whatever.
But I can't figure out a solution for either.
I tried adding to the arrays to create another text field with a getURL there, but that is no joy.
I guess I can also create a button, and call that sometimes?
Anyways, Anybody have any idea how to do this?
Easiest way would probably to XML it..but I can't figure it out.
Let me know if you need my FLA or anything.
Thanks in advance.
_D
scotty
January 22nd, 2006, 04:47 PM
@ jasmine, double click your border mc and put the left side at x= 0, then change your code in the resizeMe function like this
MovieClip.prototype.resizeMe = function(w, h) {
var speed = 3;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1) {
this._width = w;
this._height = h;
containerMC._x = this._x+spacing/2;
containerMC._y = this._y-this._height/2+spacing/2;
containerMC._alpha += 5;
if (containerMC._alpha>90) {
containerMC._alpha = 100;
delete this.onEnterFrame;
}
}
};
};
@apt d, post your fla?
scotty(-:
apt d
January 22nd, 2006, 11:52 PM
Hey Scotty, thanks for taking an interest in my little problem.
I am just using the V3_with_thumbs one.
I haven't changed anything really besides the graphics...
But I just wanted to add a "launch page" (You know, to go to a seperate browser window) to the second gallery, for each big image...
But I dont know, maybe add another array for it? Like the title array?
But anyway, heres the v3withthumbs..
http://www.gertdesign.info/kirupa/V3_with_thumbs.zip
Thanks again...
_D
scotty
January 23rd, 2006, 04:50 PM
In the xml make a new attribute 'url' for each node.
Change the gallerChoice function like this
function galleryChoice(q) {
pArray = new Array();
tArray = new Array();
iArray = new Array();
linkArray = new Array()
my_xml = new XML();
for (var j = 0; j<curLength; j++) {
this.th_nav["thmb"+j].removeMovieClip();
}
my_xml.ignoreWhite = true;
my_xml.onLoad = function(loaded) {
if (loaded) {
gallery = this.firstChild.childNodes[q];
curLength = gallery.childNodes.length;
for (var i = 0; i<gallery.childNodes.length; i++) {
pArray.push(gallery.childNodes[i].attributes.source);
tArray.push(gallery.childNodes[i].attributes.thumb);
iArray.push(gallery.childNodes[i].attributes.title);
linkArray.push(gallery.childNodes[i].attributes.url);
}
}
delay = setInterval(makeButtons, 50);
};
my_xml.load("gallery.xml");
}
The activateButtons() like
function activateButtons() {
mainButtons();
for (var i = 0; i<pArray.length; i++) {
var but = th_nav["thmb"+i];
but.id = i;
but.onRelease = function() {
container.loadPic(pArray[this.id], iArray[this.id], linkArray[this.id]);
disButtons2(this.id);
};
}
container.loadPic(pArray[0], iArray[0],linkArray[0]);
disButtons2(0);
}
and the loadPic and resizeMe functions like this
MovieClip.prototype.loadPic = function(pic, id, link) {
info.text = "";
this._alpha = 0;
this.loadMovie(pic);
temp = this._parent.createEmptyMovieClip("temp2", 998);
temp.onEnterFrame = function() {
var t = container.getBytesTotal(), l = container.getBytesLoaded();
if (Math.round(l/t) == 1 && container._width != 0 && container._height != 0) {
var w = container._width+spacing, h = container._height+spacing;
border.resizeMe(w, h, id, link);
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.resizeMe = function(w, h, id,link) {
var speed = 3;
container._alpha = 0;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
container._x = this._x-this._width/2+spacing/2;
container._y = this._y-this._height/2+spacing/2;
info._y = Math.round(this._y+this._height/2+spacing/2);
container._alpha += 5;
if (container._alpha>90) {
info.text = id;
container._alpha = 100;
container.onRelease = function(){
getURL(link, "_blank")
}
delete this.onEnterFrame;
}
}
};
};
scotty(-:
jasmine
January 23rd, 2006, 06:06 PM
hi scotty, thank you so much for you help. you are truly amazing and we are really lucky to have you on this forum to help everyone!
this gallery's photo border has a set _x point.
scotty, do you know how to add and slideshow function to this? so it will just play through all the photos on it's own?
thanks,
jasmine
@ jasmine, double click your border mc and put the left side at x= 0, then change your code in the resizeMe function like this
@apt d, post your fla?
scotty(-:
JoshuaJonah
January 23rd, 2006, 06:10 PM
how did this thread get this big?
apt d
January 24th, 2006, 01:55 PM
Oh jeez, the resizeMe function was the thing that I missed...man how simple. Thanks so much Scotty! The board is so lucky ot have your help man.
scotty
January 24th, 2006, 04:41 PM
no problem :thumb:
custo
January 31st, 2006, 10:24 AM
hi people, anyone can help me adding a preloader for each picture? Where do I have to put the code?
Thanks! I'll be working on it meanwhile... :)
bandsaw
February 1st, 2006, 09:36 PM
now is there any way to load the images from the library using attachMovie();. Id like to keep everyting internal for a projector file.
shanna
February 15th, 2006, 07:44 AM
Hello, I tried going thru everypage, and tried every code. I'm trying to combine the scrolling panel and the resizeborder together. I have the scrollpanel in one movie clip and the resize boader in another movieclip called loadpic. I've added the onrelease buttons but its not loading my pictures the box will resize to the image. But not picture will show. I'm having problems with that. and also my scroller. when i go to the left side it scrolls real slow, but going to the right side it scrolls at the speed i wanted. My main problem thats bother me is getting the image to show. Can someone help PLEASE!!. I am using Flash 8
Here's the link to the file
http://www.xplicitone.com/misha.zip
sorry about the link
..........Please
chrisclick
February 27th, 2006, 03:03 PM
ok i am very new too flash and i found some code and i changed it to required the image load and button thingy and when i click on button nothing appears? why? :upset:
nemesis-13
March 3rd, 2006, 02:43 AM
g'day..
i've been looking for an answer to this resizing problem.. thanx scotty for the fla and info.. it's working fine for me..
i just was wondering for interests sake.. if someone could actually explain what the coding does.. i mean.. it's one thing to just use the code and not understand it.. but i prefer to find out what all that code is doing.. just for my knowledge.. so if anyone could just explain what each line is doing. i would be thankful
.:: peace
Ctrice
March 3rd, 2006, 01:12 PM
Is there a way to turn the titles for picutres into links so that you can click on them?
scotty
March 4th, 2006, 05:58 AM
@ nemesis13, what version of the resize are you using (multiple/thumbs/infinite)
@Ctrice, you could use CDATA in the xml for that or add an extra attribute for the url and enable your description field for html and give the description a tags
btw both welcome to kirupaforums =)
scotty(-:
Ctrice
March 5th, 2006, 09:39 AM
@Ctrice, you could use CDATA in the xml for that or add an extra attribute for the url and enable your description field for html and give the description a tags
thanks for replying scotty, but i'm kinda new to flash, and don't know what you mean.
should I do something like this?
<gallery name="Holiday">
<image source="pics/pic1.jpg" thumb="pics/th1.jpg" title="picture" url="http://www.url.com"/>
</gallery>
scotty
March 5th, 2006, 10:13 AM
yep:)
then fill a new array 'links' like this
function galleryChoice(q) {
totPer = 0;
pArray = new Array();
tArray = new Array();
iArray = new Array();
//new array
links = new Array();
my_xml = new XML();
for (var j = 0; j<curLength; j++) {
this.th_nav["thmb"+j].removeMovieClip();
}
my_xml.ignoreWhite = true;
my_xml.onLoad = function(loaded) {
if (loaded) {
gallery = this.firstChild.childNodes[q];
curLength = gallery.childNodes.length;
for (var i = 0; i<gallery.childNodes.length; i++) {
pArray.push(gallery.childNodes[i].attributes.source);
tArray.push(gallery.childNodes[i].attributes.thumb);
iArray.push(gallery.childNodes[i].attributes.title);
//fill the links array
links.push(gallery.childNodes[i].attributes.url);
}
}
delay = setInterval(makeButtons, 50);
};
my_xml.load("gallery.xml");
}
to call the link change the activateButtons functions
function activateButtons() {
mainButtons();
for (var i = 0; i<pArray.length; i++) {
var but = th_nav["thmb"+i];
but.id = i;
but.onRelease = function() {
container.loadPic(pArray[this.id], iArray[this.id], links[this.id]);
disButtons2(this.id);
};
}
container.loadPic(pArray[0], iArray[0], links[0]);
disButtons2(0);
}
and change the loadPic and resizeMe like this (so you have the right link)
MovieClip.prototype.loadPic = function(pic, id, link) {
info.text = "";
bar._x = this._x;
this._alpha = 0;
this.loadMovie(pic);
bar._visible = 1;
temp = this._parent.createEmptyMovieClip("temp2", 998);
temp.onEnterFrame = function() {
var t = container.getBytesTotal(), l = container.getBytesLoaded();
var per = Math.round((l/t)*100);
bar._width = Math.round((l/t)*curwidth);
info.text = per+" % loaded";
if (Math.round(l/t) == 1 && container._width != 0 && container._height != 0) {
bar._visible = 0;
bar._xscale = 0;
var w = container._width+spacing, h = container._height+spacing;
curwidth = w;
border.resizeMe(w, h, id, link);
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.resizeMe = function(w, h, id, link) {
var speed = 3;
container._alpha = 0;
this.onEnterFrame = function() {
info._y = Math.round(this._y+this._height/2+spacing/2);
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
container._x = this._x-this._width/2+spacing/2;
container._y = this._y-this._height/2+spacing/2;
info._y = Math.round(this._y+this._height/2+spacing/2);
bar._x = this._x-this._width/2+spacing/2;
container._alpha += 5;
if (container._alpha>90) {
info.html = true;
info.htmlText = "<a href='"+link+"'>"+id+"</a>";
container._alpha = 100;
delete this.onEnterFrame;
}
}
};
};
scotty(-:
Ctrice
March 5th, 2006, 05:06 PM
thanks so much for your help scotty, it worked great!
scotty
March 5th, 2006, 05:41 PM
no problem :thumb:
jdesign
March 11th, 2006, 10:07 AM
Hi i'm building a site which has several photo gallery inside it. so i want to use different .xml file for each gallery.
how do i unload the xml file for this resizing slideshow?
What i've tried:
1.I've add second, third keyframe so when the button is pushed it goes to the keyframe targetted, on each keyframe in the action script i've change "gallery.xml" to Eg. "gallerynew.xml" but it still loading gallery.xml not the new one
2.i'm giving thumbnailMC a new name for each keyframe and change all thumbnailMC in the actionscript, but still it's loading the original gallery.xml from the first keyframe.
it's look like it's being cached or something.
I've tried several unload commands but don't know which is the right one.
Anyone has a suggestion how to unload the xml and replace with a new xml file?
scotty
March 11th, 2006, 12:00 PM
Post your fla/xml(s)/ etc...?
scotty(-:
hybred
March 14th, 2006, 06:31 AM
hello all...
i've got this beautiful gallery running with asp and a database..
does anybody know how i would go about adding "_small" to the end of the tarray..
i want to point the tarray to the image attribute in the xml and then append the text.. ie.
tArray.push(gallery.firstChild.childNodes[i].attributes.image);
//not thumbnail
returns 'images/image1.jpg' etc.
then add "_small" to return 'images/image1_small.jpg' etc..
i've been searching everywhere but cannot figure it out..
cheers
pete_zahut
March 14th, 2006, 06:53 AM
Something like this (so you loop it in a for):
stringLength = tArray[i].length;
thumbString = tArray[i].slice(0,stringLength-4) + "_small.jpg";
tArray[i] = thumbString;
length-4 = starting point of the ".jpg" extenstion.
Check : Actionscript Dictionary (http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary695.html)
(not sure if this works...)
pete_zahut
March 14th, 2006, 07:01 AM
I have another problem:
How do I use a preloader :h: I'm reading out my xml like this:
for (var j=0; j<xml_feeds[i].childNodes.length; j++){
currNode = xml_feeds[i].childNodes[j].firstChild;
trace("["+i+"]"+"["+j+"] -- "+ currNode);
switch(j) {
case 0: //NAME
scroll.feeder["feed_"+i].info.mc_info.txt_name.htmlText = currNode;
break;
case 1: //MESSAGE
scroll.feeder["feed_"+i].info.mc_info.txt_msg.htmlText = currNode;
break;
case 2: //DATE
scroll.feeder["feed_"+i].info.mc_info.txt_date.text = currNode;
break;
case 3: //IMAGE
scroll.feeder["feed_"+i].holder.loadMovie("teken/"+currNode);
/*scroll.feeder["feed_"+i].preloader._visible = true;
scroll.feeder["feed_"+i].onEnterFrame = function() {
trace(scroll.feeder["feed_"+i].holder.getBytesLoaded());
perc = (scroll.feeder["feed_"+i].holder.getBytesLoaded()/scroll.feeder["feed_"+i].holder.getBytesTotal)*100();
scroll.feeder["feed_"+i].preloader.bar._width = perc;
if(scroll.feeder["feed_"+i].holder.getBytesLoaded()>=scroll.feeder["feed_"+i].holder.getBytesTotal) {
scroll.feeder["feed_"+i].preloader._visible = false;
delete this.onEnterFrame();
}
}*/
break;
}
}
But I'm getting in an infinite loop ... if i put that comment into code.
:hangover:
hybred
March 14th, 2006, 07:09 AM
thanks pete.. thak looks like it might do the trick.. will try it later..
sorry i can't help you with your problem.. :puzzled:
frez
March 16th, 2006, 10:23 AM
oops - i did not mean to ask my question in this thread. i've moved it to here (http://www.kirupa.com/forum/showthread.php?p=1798496#post1798496).
ferdibulbul
March 19th, 2006, 04:42 AM
hi,
How can i add a description dynamic text to that fla. When I clicked to thumb it will read from xml. I couldnt achieve..
eidetiken
March 26th, 2006, 10:12 AM
I'm just trying to get a preloader to work in the V3withThumbs. I've tried every preloader listed in this thread and none of them work. Not one. I'd like to have the thumbs at 20% alpha while the full pic is loading, and then have the thumb turn 100% as the full size pics load... saw that effect in the artgallery_new2new2004.fla. But I can't get that gallery to work.
So how do you get a preloader... any preloader... to work in the V3withThumbs gallery?
jasmine
April 7th, 2006, 07:08 PM
hello, i'm try to use this gallery - does anyone know how to change the code, so there is a solid x position of the gallery (images are flushed to left side of the page)? thanks for any help!
function resizeMe(w, h) {
//border tween:
border.tween(["_width", "_height"], [w, h], speed_resize, tweentype_resize);
//pic and picinfo fade in:
containerMC.alphaTo(100, speed_fadeIn, tweentype_fadeIn, speed_resize);
picinfo.alphaTo(100, speed_fadeIn, tweentype_fadeIn, speed_resize);
//pic position:
containerMC._x = border._x-containerMC._width/2;
containerMC._y = border._y-containerMC._height/2;
bhogiyogi
April 11th, 2006, 12:02 PM
Hi all
I have used this gallery before and its work great for me. It's been great.
What i am trying to do now is use the v3 multiple gallery to be totally XML based.
Right now the main galleies have to be statically put. There are 4 galleries right now.
I was wondering is there a way to make all the name of the galleries to be dynamic as well.
thanks
yogi
JoshuaJonah
April 11th, 2006, 12:04 PM
I had no idea a resizing gallery would generate 55 pages.
scotty
April 11th, 2006, 12:13 PM
@bhogiyogi: http://www.kirupa.com/forum/showthread.php?t=213873 post #3
@jasmine: If I understand you right, set the registration point of the border mc to the center right and change your code like this
function resizeMe(w, h) {
//border tween:
border.tween(["_width", "_height"], [w, h], speed_resize, tweentype_resize);
//pic and picinfo fade in:
containerMC.alphaTo(100, speed_fadeIn, tweentype_fadeIn, speed_resize);
picinfo.alphaTo(100, speed_fadeIn, tweentype_fadeIn, speed_resize);
//pic position:
containerMC._x = border._x-containerMC._width;
containerMC._y = border._y-containerMC._height/2;
}
scotty(-:
RaRdEvA
April 17th, 2006, 10:01 AM
i can't see the file T-T i get a message "Cannot download open the location, The server has sent an invalid response or not recognized"
scotty
April 18th, 2006, 02:15 AM
i can't see the file T-T i get a message "Cannot download open the location, The server has sent an invalid response or not recognized"
??
scotty(-:
sara_d
April 18th, 2006, 03:25 AM
Hi Scotty, please help!
I'm using the xml gallery fla from this thread . Fantastic!
here is my question...
When I have thumbnails in 100s (say 200 to 300) , the script wait for all thumbnails to be loaded before I can click on the thumbnail to view the main image.
Is 'AS' not multi-threaded? Can I not view the slide image parallely when the thumbnail loading is in progress?
FYI: Thumbnail size average is 5 to 10KB and the slide image is around 100KB., I tested on m/c with 3GHz and 2GB ram.
Just from my initial tests, the xml gallery version posted in this thread (http://www.kirupa.com/forum/showthread.php?t=202132) does seem to allow load the main image when the thumbnail loading is in progress!
Any insight how this can be resolved? I don't want the user to wait till all the thumbnails are loaded.
Thank you very much!
S A R A
scotty
April 18th, 2006, 03:52 AM
Off course it's possible:)
Chenge the loadButtons and nextButton function like below (and you can skip the acivateButtons function)
function loadButtons() {
//added next two lines
var but = th_nav["thmb"+tnNr];
but.id = tnNr;
var tbox = th_nav["thmb"+tnNr].box;
tbox.loadMovie(tArray[tnNr]);
temp = this.createEmptyMovieClip("tmp"+tnNr, 999);
temp.onEnterFrame = function() {
bt = tbox.getBytesTotal();
bl = tbox.getBytesLoaded();
var per = Math.round(((bl/bt)*100)/tArray.length);
bar._width = ((totPer+per)/100)*curwidth;
info.text = "loading thumbnail "+(tnNr+1)+" of "+tArray.length+" total";
if (bt == bl && bt>4) {
//set the onrelease actions here, so you can use each thumb that has loaded
but.onRelease = function() {
container.loadPic(pArray[this.id], iArray[this.id]);
disButtons2(this.id);
};
nextButton();
totPer += per;
delete this.onEnterFrame;
}
};
}
function nextButton() {
if (tnNr<tArray.length-1) {
tnNr++;
loadButtons();
if (tnNr == 1) {
//show the first pic if the second thumb gets loaded
th_nav.thmb0.onRelease();
}
} else {
mainButtons();
}
}
btw welcome to kirupaforums :)
scotty(-:
sara_d
April 19th, 2006, 01:08 PM
Scotty,
Fantastic! That worked. Thanks a lot.
If there is any issue with loading the thumb image, then the script stops. (when thumbnail image not found or when it's not in jpg format). I'll add some delay logic to wait and see if it loads or else continue with the next thumbnail loading. Anyway, this is a homework for me :)
degree73
April 19th, 2006, 06:37 PM
Hi
Im new here and was wondering if someone can look at my file for this auto resize image container. My file is too large to post here so can someone send me an email address and I can send the file there?
Thanks in advance
RhythmMethod
April 24th, 2006, 11:02 PM
Hello Scotty and crew,
May I beg some help on the xml for the multiple gallery version? I need to expand on the gallery info. Instead of one sold paragraph, I need to make a list, with sublists. Here is the sort of thing I need to display with each gallery:
v1968 E.M.POLLMANN (with link to Pollmann's site)
ØVersatile, Colorful Tone
ØPollmann Quality Material & Construction
ØConsignment Sale - No Sales Tax!
ØSpecifications
§String Length - 41.0 Inches
§Body Length - 109.6cm
§Upper Bout Width - 48.7cm
§Middle Bout Rib Depth - 35.7cm ØStandard Classic Contrabass Setup
§Adjustable Bridge
§Solid Ebony Fingerboard
§German Endpin
§Professionally Dressed Fingerboard
§Properly Fitted Soundpost
§Stele Cable Tailgut
I honestly tried to get my head around it, but only managed to break the file pretty good. After a couple of days I figure I'd better ask. Any help greatly appreciated!
Best,
John
mattiej
April 25th, 2006, 08:03 AM
Hi, I'm using the multiple border resizing script, works great! :cap:
But I don't want to navigate trough lose buttons, but with prev and next buttons, how is that possible? :be:
Allready thanks =)
matt
RhythmMethod
April 26th, 2006, 01:14 PM
Here is my xml doc thus far, hoping one of you pros can point me in the right direction:
<?xml version="1.0" encoding="utf-8"?>
<portfolio>
<gallery info="1968 E.M.Pollmann">
<featurelist>
<feature>Versatile, Colorful Tone</feature>
<feature>Pollmann Quality Material and Construction</feature>
<feature>Consignment Sale - No Sales Tax!</feature>
<feature>Specifications:
<subfeature>String Length - 41.0 Inches</subfeature>
<subfeature>Body Length - 109.6cm</subfeature>
</feature>
</featurelist>
<image title="" source="basses/1983pollmann/image1.jpg"/>
<image title="" source="basses/1983pollmann/image2.jpg"/>
<image title="" source="basses/1983pollmann/image3.jpg"/>
</gallery>
<gallery info="Built in 1789 by Strads cousin, Rudy Kazooti.">
<image title="" source="basses/sb80/image1.jpg"/>
<image title="" source="basses/sb80/image2.jpg"/>
<image title="" source="basses/sb80/image3.jpg"/>
<image title="" source="basses/sb80/image4.jpg"/>
</gallery>
</portfolio>
What I am trying to add to the existing multiple gallery version is an item list with sub-items that describe the things in the gallery. I've gotten the xml file to at least display the tree ok in a browser. Here are a couple of questions that I'm having a hard time finding answers to:
I would like "gallery info" to land in one dyn text field with a display font, no problem there. Now can I get everything in featurelist, including feature and subfeature, into one text field? And what would be the trick to indenting between feature and subfeature?
I'm having trouble with the AS that takes the info and plugs it into the proper text field. I've tried a whole slew of guesses, no luck though. I assume it's something in addition to:
if (success) {
var gallery = this.firstChild.childNodes[a];
gallery_txt.text = gallery.attributes.info;
feature_txt.text = lost right here
It's like I'm missing some little piece of knowledge about paths or something, could really use a pointer or two.
Many thanks! You guys have been great with this whole gallery business.
John
RhythmMethod
April 27th, 2006, 10:20 AM
Doh! I think I have the answer, do the whole paragraph between cdata tags and format with html. Make sense?
kos010
May 11th, 2006, 11:55 AM
after 837 posts and almost 2 years I thought, lets use this gallery. Omigod it just rocks so hard. For the ones who made this possible and those who participated in the evolution, respect!
But, ofcourse I've got a question as well: I want to have the thumbs menu (I'm not using the arrays nor the infinite version, but v3 (I think)) without resizing, so that it stays on the same location. This is easily done in the resize proto by adding some // for the code that passes x&y coordinates to the nav.
Now I want to open the visible photos from the bottom and middle: This way, I can give the nav a standard place (and add text beneath the resizing gallery) In one of the fla's of someone (forgive me, I've just read about 45 pages and dont know who it was, it was a mock up for a photographers site) this was done form the top left: I want to resize it from bottom - centre (middle).
I knwo it has something got to do with the registration point but is doesnt work in my fla! and that is something I dont like. Below is a sketch of what I want to achieve, and ofcourse with a fla.
Could some one take a look at this and please pleaase tell me what I'm doing wrong? thanks!
kos010
May 11th, 2006, 12:00 PM
duh sumthing went wrong
michey
May 11th, 2006, 03:50 PM
I could not open your fla, may be F8, so I'm not really shure what you are trying to do.
This should center an MC on Stage in Relation to Stage width and height.Maybe for the _y Position you have just to write the apposite number.
ContainerMC._x = (Stage.width-ContainerMC._width)/2;
ContainerMC._y = (Stage.height-ContainerMC._height)/2;
or in you case:
ContainerMC._x = (Stage.width-ContainerMC._width)/2;
ContainerMC._y = 450;// or whatever
sepu
May 11th, 2006, 05:19 PM
hey guys .... Great Thread ! Thanks a lot for all the help !.
I've got a quick question ... is it possible to use text as links instead of the thumbnails in one of these galleries like for example :
Go to the Projects section of each. (by the way both sites are cool too)
http://www.easybit.it/flash2005/main.php?language=eng
http://www.workrocks.com/?lang=en
and also how could you add more pics let's say you've got one of your works and then you want to show 3, 4 etc pics of the same work ? (you can see this in the examples above as well) Im sure this is more advanced anyway any help would be appreciated.
thanks.
kos010
May 12th, 2006, 04:52 AM
hi michey,
thanks for the reply but it was not was i was looking for (yet;) this morning, with a fresh view towards the gallery, I managed to fix it (a bit). Based on what scotty advised jasmine, I deleted the /2 behind the line that gives containerMC its y coordinates. Then, I changed the registrationpoint of the border mc
containerMC._x = border._x-containerMC._width/2;
containerMC._y = border._y-containerMC._height;
But still, I think I did something wrong. How do i change the registrationpoint of this border mc? When i double click a line of the square in border mc, and use the transform tool to set the dot somewhere else nothong happens. What I've done now is changing the heigth of the borders (in border mc) by hand: so its location is now -60, -90 (width 120, height 90). Is this the correct way of doing it or am i really stupid? Anyways, I've attached the fla to this post for the ones that want to take a look if I'm right or wrong. (saved as mx cause the first was f8 indeed)
michey
May 12th, 2006, 10:24 AM
Maybe I can post a solution for you tonight.
I worked on nearly the same Problem(but zooming in instead of fading) for my new Site (link below) using the same gallery as you.
Edt:
I just added spacing/2 to your code and it seems to work to me now.
containerMC._x = border._x-containerMC._width/2;
containerMC._y = border._y-(containerMC._height+spacing/2);
RhythmMethod
May 13th, 2006, 06:42 PM
A quick question if I may on using the menubar component that ships w/ mx2004pro:
I can't figure out how to get it to choose galleries. The menu xml populates perfectly, but I can't figure out the AS to get it talking to the gallery. The component instance name is menuBar. If I use this:
this.menuBar.onRelease = function() {
galleryChoice(id);
};
}
, the menubar fires the gallery, not the children/menus. So I have a path problem, but no clue how to solve it. Any hints?
kos010
May 14th, 2006, 04:22 PM
Maybe I can post a solution for you tonight.
I worked on nearly the same Problem(but zooming in instead of fading) for my new Site (link below) using the same gallery as you.
Edt:
I just added spacing/2 to your code and it seems to work to me now.
containerMC._x = border._x-containerMC._width/2;
containerMC._y = border._y-(containerMC._height+spacing/2);
Thanks michey, I'm not behind the pc with the files right now but it's the first thing I'll do tommorow morning!
doctor_funk
May 15th, 2006, 02:33 AM
I'm trying to use this resizing gallery effect with Kirupa's "Creating a full Flash site" tutorial( http://www.kirupa.com/developer/mx/full_site.htm ). When the movie loads in main window, the thumbnails I created show up, and the box resizes when I click on the various thumbnails, but nothing appears within the resizing box. Does anyone have any ideas for a fix for this?
kos010
May 15th, 2006, 05:48 AM
Michey, when you're ever in Holland let me buy you a beer (or a soda) thanks!
michey
May 15th, 2006, 06:25 AM
OK.
I'm glad I could help you a bit. You have already been there by yourself.
Cheers
Icy Penguin
May 16th, 2006, 04:04 PM
is there any way to have the resize gallery play as a slideshow and change like every 5 seconds, but if a user clicks the next button, it still works?
gorilla1
May 17th, 2006, 09:43 PM
A couple of very basic questions... I am working on V3_with_thumbs (for MX). It has an xml file with titles for each gallery. It seems like these titles in the xml file, if changed, should be reflected in the movie as the gallery titles. However, changing them in the xml file does not change them in the movie, nor can I spot another way to change them. Am I overlooking something? As well, I would like to change the font for these gallery titles and can't spot how to do that.
G
mucho
June 1st, 2006, 03:56 PM
darn... this threads been probably on for over two years!
sory I didn`t answer any questions after page 20 or so, but I felt like saying.
mucho
scotty
June 4th, 2006, 02:40 AM
This thread is a (partial) duplicate of this thread
http://www.kirupa.com/forum/showthread.php?t=132588
so to avoid duplicate questions it's better to close this one.
For questions etc., use the above link :)
scotty(-:
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.