Flash / XML Gallery Thumbnail Problem
I've come across a problem that we can not seem to find any solution to. We're trying to update our firms site with XML and Flash and would like our gallery/portfolio to have dynamic thumbnails instead of the generic boxes that XML generates. here is a link for a screen shot of what we are hoping to accomplish.
http://www.bleedmedia.com/preview.html
The second link is a test site of where we currently are stuck.
http://www.bleedmedia.com/test
The thumbnails change on rollover from black and white to color. We have 2 folders with the on and off images saved with the same names.
Anyone that can help will be our #1 super friend forever. If it'd be helpful to see the current coding of where we are at now let me know and I'll post it too. Thanks!
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 09-06-2005, 06:18 PM
View Complete Forum Thread with Replies
Sponsored Links:
FLV Video Thumbnail + Thumbnail Gallery With LinkIDs From XML
Let's say for instance, our XML file:
<videos>
<video linkid="AK0001" thumb="http://www.site.com/pathtofile/filename.flv">
<link>http://www.site.com/pathtofile/filename.flv</link>
</video>
</videos>
Is it possible to use the source flv file as the thumbnail? Or, is it better to create a thumbnail of all the content?
With this said, how would I create the event handler to satisfy when each thumbnail is clicked, it stores it's linkid in the $_GET variable?
Thank You,
b0gui
View Replies !
View Related
Flash Thumbnail Gallery Help
Hello, I have just recently started using flash, and have been experimenting in animation and movie's, now I want to try out a wep page format with flash.
I want to try a thumbnail gallery first, how do I go about this?
I have tried looking for tutorials on this site and others, and there appears to be no instructions on building a thumbnail gallery or even many things related to designing a flash page as opposed to a flash movie.
Thankyou.
View Replies !
View Related
XML Flash Thumbnail Gallery
Dear All,
I have used the tutorial posted on kirupa.com to create a profile of mine. I have few issue which i am not able to solve. Any kind of help is appreciated.
I have a problem with the thumbnails not spaced correctly with the small brace brackets in the design. I have attached the .fla with this post. Also I wanted the user will click the arrows or rollover to scroll the thumbnails..which will be a continuous loop ..like once it will reach the last thumbnail it will start over again.
Thanks in advance!
View Replies !
View Related
Flash Thumbnail Gallery Using XML
Hello All,
sorry if this topic is duplicated. I'm a web designer, and recenrtly I'm studying more more Actionscript.
I have to make a Sliding Thumbnail Gallery using XML.
This project is for property agent.
I could do most things by Kirupa's Tutorial (thank Kirupa!),
thumbnails are houses pictures, and now I have to make each house prices under thumbnail!
I'm just a designer, and I didn't understand code 100%. It would be a simple thing to add prices under thumbnail and slide together, but I'm stuck!. It would be great if anyone can give me a suggestion. You can see my test page from;
http://www.qbf.ie/overseas/featured.html
please help!
View Replies !
View Related
Xml Thumbnail Flash Gallery
Dear kirupa
I was trying to use your flash xml gallery in my website , when i put it there it didnot work the scroller did not move left and right
please tell me what i should do
Thanks
http://www.kirupa.com/developer/mx2004/thumbnails.htm
View Replies !
View Related
Xml Thumbnail Flash Gallery
Hi there,
I have a little question regarding the thumbnail section of the xml gallery tutorial. I managed to set up the entire gallery with thumb scroller and everything works fine, but I was wondering : if I wanted to hide the thumbnail scroller and only reveal it when the user moves over a particular point ( and make it active of course so the user can select the thumb he wants) and slides back into hiding when the user navigates away, how would I do that? I've tried briefly to load only the thumbscroller in a separate Mc that could be animated , but then the scroller doesn't work anymore...
any ideas?
Kind regards,
Bart
View Replies !
View Related
Flash Thumbnail Gallery Help
Followed a thumbnail gallery.tutorial.
I reposistioned/resized the image area and thumnails area accordingly on my layout and then loaded my new images on them via xml. I used the new dimensions of the image/thumbnail area to size the images i will use.
Unfortunately they were stretched.
I'm not too proficient with action script, please someone save me as I'm stuck and I need to finish my portfolio site. Is there a way to customize the sizing on the script? Check what I have so far, the first thumb and image is the painfull result, although posistion and size is right. Any help is appreicated. Thanks in advance!
My portfolio site. HELP PLEASE
here's the script:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
thumbnails = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("identity.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
} else if ((_root._xmouse<=(hit_left._x+40)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
View Replies !
View Related
Photo Gallery Using XML And Flash - Thumbnail Bug
Hi,
i am trying to use the gallery with Thumnails that i found in the tutorial part of the site.
I made the thumbnails vertical instead of horizontal.
But i dont think the problem comes from that.
here is the thing:
when loading the thumbnails, if the thumbnails if the thumbnails picture are in diferrent size it messes it al up.
here is the code that i adapted:
///////////////////////////////////////////////////////////////////////////////////////
Code:
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._y = hit_left._y+(eval("thumbnail_mc.t"+k)._height+5)*k;
target_mc.pictureValue = k-1;
target_mc.onRelease = function() {
p = this.pictureValue;
nextImage();
};
///////////////////////////////////////////////////////////////////////////////////////
I think the problem comes from this lign:
Code:
target_mc._y = hit_left._y+(eval("thumbnail_mc.t"+k)._height+5)*k
actually it places the movie according its own size assuming that all the previous movies in the loop where the same size. but they aren't
I been trying to make it work for so long but i can t find a way to go around it
i hope someone will be able to help me
thanx
here is the link to the demo
http://phoenix68.9online.fr/daeja2.swf
as you can see the two last thumbnails assume than the 8 before them where the same size as they are ....
View Replies !
View Related
XML/Flash Gallery With Thumbnail Question
Hi
I did the XML photo gallery adding thumbnails tute(http://www.kirupa.com/developer/mx2004/thumbnails.htm). Everything works fine for the originally setting but when I am trying to use different sizes thumbnails(different width), the thumbnails start overlaping eachother.
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
I think no matter what the width of my thumbnails are the above code should still work. I know it might be a easy problem, but I just can't figure it out. Please help me. Thanks guys
View Replies !
View Related
Photo Gallery Using XML And Flash With Thumbnail
Hello everyone! im having a problem with the Photo Gallery using XML and Flash with thumbnail, its about autoresizing the dynamic image, for ex. I have lots of different resolution of pictures and when i called it in flash, using the _xscale and _yscale the images are resized but not in center of my background. i just want to ask, how will i make the different resolution of dynamic images always center in my background.
Tnx! God Bless!
View Replies !
View Related
Photo Gallery Using XML And Flash. Thumbnail As A Link
Hello to everyone, First of all i would like to say how useful your tutorial
http://www.kirupa.com/developer/mx2004/thumbnails.htm
was to me as i intented to do something similar and it really helped me. However i have a small problem (i think). Instead of clicking a thumbnail and opening a larger image i want the thumbnail to be a link for a url. I would really appreciate any help. Thank you
View Replies !
View Related
Photo Gallery With XML And Flash : Second Thumbnail Area
I'm trying to get two thumbnail movieclips on the same page to display two different arrays of pictures. It's not working though and I'm not sure why, could someone please look at my xml and ActionScript and see what I'm doingwrong. I've been at this for a few hours now and I can't see whats wrong. Please help!
XML:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<category>Bodysuit</category>
<name>Body Suit 1</name>
<description>Body Suit 1 description.</description>
<mainimage>photos/bodysuit/large/bs1.jpg</mainimage>
<mainthumb>photos/bodysuit/small/bs1.jpg</mainthumb>
<price>$00.00</price>
<sizes>0 - 0</sizes>
<otherimages>photos/bodysuit/large/bs1.jpg</otherimages>
<otherthumbs>photos/bodysuit/small/bs1.jpg</otherthumbs>
</pic>
<pic>
<category>Bodysuit</category>
<name>Body Suit 2</name>
<description>Body Suit 2 description.</description>
<mainimage>photos/bodysuit/large/bs2.jpg</mainimage>
<mainthumb>photos/bodysuit/small/bs2.jpg</mainthumb>
<price>$00.00</price>
<sizes>0 - 0</sizes>
<otherimages>photos/bodysuit/large/bs2.jpg</otherimages>
<otherthumbs>photos/bodysuit/small/bs2.jpg</otherthumbs>
</pic>
<pic>
<category>Bodysuit</category>
<name>Body Suit 3</name>
<description>Body Suit 3 description.</description>
<mainimage>photos/bodysuit/large/bs3.jpg</mainimage>
<mainthumb>photos/bodysuit/small/bs3.jpg</mainthumb>
<price>$00.00</price>
<sizes>0 - 0</sizes>
<otherimages>photos/bodysuit/large/bs3.jpg</otherimages>
<otherthumbs>photos/bodysuit/small/bs3.jpg</otherthumbs>
</pic>
<pic>
<category>Bodysuit</category>
<name>Body Suit 4</name>
<description>Body Suit 4 description.</description>
<mainimage>photos/bodysuit/large/bs4.jpg</mainimage>
<mainthumb>photos/bodysuit/small/bs4.jpg</mainthumb>
<price>$00.00</price>
<sizes>0 - 0</sizes>
<otherimages>photos/bodysuit/large/bs4.jpg</otherimages>
<otherthumbs>photos/bodysuit/small/bs4.jpg</otherthumbs>
</pic>
<pic>
<category>Bodysuit</category>
<name>Body Suit 5</name>
<description>Body Suit 5 description.</description>
<mainimage>photos/bodysuit/large/bs5.jpg</mainimage>
<mainthumb>photos/bodysuit/small/bs5.jpg</mainthumb>
<price>$00.00</price>
<sizes>0 - 0</sizes>
<otherimages>photos/bodysuit/large/bs5.jpg</otherimages>
<otherthumbs>photos/bodysuit/small/bs5.jpg</otherthumbs>
</pic>
<pic>
<category>Bodysuit</category>
<name>Body Suit 6</name>
<description>Body Suit 6 description.</description>
<mainimage>photos/bodysuit/large/bs6.jpg</mainimage>
<mainthumb>photos/bodysuit/small/bs6.jpg</mainthumb>
<price>$00.00</price>
<sizes>0 - 0</sizes>
<otherimages>photos/bodysuit/large/bs6.jpg</otherimages>
<otherthumbs>photos/bodysuit/small/bs6.jpg</otherthumbs>
</pic>
<pic>
<category>Bodysuit</category>
<name>Body Suit 7</name>
<description>Body Suit 7 description.</description>
<mainimage>photos/bodysuit/large/bs7.jpg</mainimage>
<mainthumb>photos/bodysuit/small/bs7.jpg</mainthumb>
<price>$00.00</price>
<sizes>0 - 0</sizes>
<otherimages>photos/bodysuit/large/bs7.jpg</otherimages>
<otherthumbs>photos/bodysuit/small/bs7.jpg</otherthumbs>
</pic>
<pic>
<category>Bodysuit</category>
<name>Body Suit 8</name>
<description>Body Suit 8 description.</description>
<mainimage>photos/bodysuit/large/bs8.jpg</mainimage>
<thumbnail>photos/bodysuit/small/bs8.jpg</thumbnail>
<price>$00.00</price>
<sizes>0 - 0</sizes>
<otherimages>photos/bodysuit/large/bs8.jpg</otherimages>
<otherthumbs>photos/bodysuit/small/bs8.jpg</otherthumbs>
</pic>
</images>
ActionScript:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
category = [];
title = [];
image = [];
description = [];
thumbnails = [];
price = [];
sizes = [];
otherimages = [];
otherthumbs = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
category[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
title[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
image[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
thumbnails[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue;
thumbnails_fn(i);
price[i] = xmlNode.childNodes[i].childNodes[5].firstChild.nodeValue;
sizes[i] = xmlNode.childNodes[i].childNodes[6].firstChild.nodeValue;
otherimages[i] = xmlNode.childNodes[i].childNodes[7].firstChild.nodeValue;
//otherimages_fn(i);
otherthumbs[i] = xmlNode.childNodes[i].childNodes[8].firstChild.nodeValue;
otherthumbs_fn(i);
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images2.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
price_txt.text = price[p];
sizes_txt.text = sizes[p];
title_txt.text = title[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
price_txt.text = price[p];
sizes_txt.text = sizes[p];
title_txt.text = title[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize){
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
price_txt.text = price[0];
sizes_txt.text = sizes[0];
title_txt.text = title[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._heig ht)) {
if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
} else if ((_root._xmouse<=(hit_left._x+40)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
function otherthumbs_fn(l) {
thumbnail_mc1.createEmptyMovieClip("s"+l, thumbnail_mc1.getNextHighestDepth());
slistener = new Object();
slistener.onLoadInit = function(target_mc_1) {
target_mc_1._x = hit_left1._x+(target_mc_1._width+5)*l;
target_mc_1.pictureValue = l;
target_mc_1.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc_1.onRollOver = function() {
this._alpha = 50;
// thumbNailScroller();
};
target_mc_1.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl_1 = new MovieClipLoader();
image_mcl_1.addListener(slistener);
image_mcl_1.loadClip(otherthumbs[l], "thumbnail_mc1.s"+l);
}
If you can help that would be great!
View Replies !
View Related
[Flash 8] XML Gallery - Show Current Thumbnail
Hey all,
I am having trouble making some additions to the tutorial found here.
I have the XML gallery with the scrolling thumbnails. I would like to make it so that when you click a thumbnail, not only does the new image load, but the thumbnail you've just clicked shows that that is the current image you're viewing. For example, here is what I have:
1 - all thumbnails load at 25% opacity
2 - on rollover, they go to 50% opacity
3 - on rollout, they go back to 25% opacity.
What I want is that when you click one, it goes to 100% and stays there until you click another.
Here's what I tried:
I made this function
function resetAlpha (){
target_mc.enabled = true;
target_mc.alpha = 25;
}
then in the onRelease for the thumbnails, I have:
target_mc.onRelease = function() {
resetAlpha();
this._alpha = 100;
this.enabled = false;
p = this.pictureValue-1;
nextImage();
}
I thought that by doing this it would reset all the thumbs back to 25% opacity, re-enable all of them, but then disable the one that was just clicked and make it 100% opacity. But what is happening is that none of them are resetting and that when I click them, they all stay 100% and disabled. Is there anyone who can shed some light on this problem? I didn't post all of the source code because you can see it in the tutorial more clearly. I would really appreciate some help if anyone can offer it.
Thanks,
Tom
View Replies !
View Related
Flash 8 Image/Thumbnail Gallery Problem
Howdy,
I'm currently constructing an image gallery interface that incorporates a maximum of 20 thumbnails for each menu category. All images are extracted from an XML file.
Basically all is working the way intended, however, there's a problem with the thumbnail section.
When the user clicks on the category in the menu, clickable thumbnails (movie clips) load in a 4x5 grid formation, together with the first large image. When you rollover the thumbnails, the alpha changes, and upon rollout they return to the up state. Also, when a thumbnail is clicked, it too changes shade until another thumbnail is clicked. THIS is all working fine!
It's when I decide that I ALSO want the first thumbnail to be shaded upon loading (to correspond with the large image), that things go wrong. With my current code, everything works as before, except that the first thumbnail keeps this shade throughout - so its rollover become twice as dark, and it's initial shading isn't removed by clicking other thumbnail buttons.
If anyone has any suggestions, I'd appreciate them. Here's the relevant sections of code...
function loadThumbnail() {
currentThumbnail = thumbsDisplayer.attachMovie("thumbnail holder", "thumbnail"+(tracker+1), thumbsDisplayer.getNextHighestDepth());
target = currentThumbnail.thumbImage_mc;
if ((tracker%4) == 0 && tracker != 0) {
currentRow += 1;
}
if (currentColumn>2) {
currentColumn = 0;
} else if (tracker == 0) {
currentColumn = 0;
} else {
currentColumn += 1;
}
currentThumbnail._x = currentColumn*thumbMarginX;
currentThumbnail._y = currentRow*thumbMarginY;
currentThumbnail.percent_txt._visible = true;
thumbNumber = currentThumbnail._name.substr(9);
thumbPath = "gallery/"+whichGallery+"/thumbs/"+thumbNumber+".jpg";
whatIsLoading = "thumb";
if (thumbNumber == 1) {
// create a variable to track the currently selected button
var activethumb:MovieClip;
currentThumbnail.attachMovie("Darken_mc","Darken_m c",this.getNextHighestDepth());
activethumb = this;
}
loader.loadClip(thumbPath, target);
}
function loadAutoBigImage() {
removeMovieClip(displayBigImage);
displayBigImage = imagesHolder.attachMovie("big image holder", "bigImage_mc", imagesHolder.getNextHighestDepth());
target = displayBigImage.imageHolder_mc;
bigImagePath = "gallery/"+whichGallery+"/"+1+".jpg";
whatIsLoading = "big";
loader.loadClip(bigImagePath, target);
}
function thumbClickable():Void {
currentThumbnail.onPress = function() {
if (this != activethumb) {
activethumb.Darken_mc.removeMovieClip();
this.Darken_mc.removeMovieClip();
this.attachMovie("Darken_mc","Darken_mc",this.getN extHighestDepth());
activethumb = this;
removeMovieClip(displayBigImage);
descText.text = galleryIntros[clickedGallery];
bigNumber = this._name.substr(9);
displayBigImage = imagesHolder.attachMovie("big image holder", "bigImage_mc", imagesHolder.getNextHighestDepth());
target = displayBigImage.imageHolder_mc;
bigImagePath = "gallery/"+whichGallery+"/"+bigNumber+".jpg";
whatIsLoading = "big";
loader.loadClip(bigImagePath, target);
if (clickedGallery>0) {
var descPosition:Number = 0;
for (i=0; i<clickedGallery; i++) {
descPosition += imagesInGallery[i];
}
descPosition = descPosition+Number(bigNumber)-1;
imageDesc = descriptions[descPosition];
} else {
imageDesc = descriptions[Number(bigNumber)-1];
}
descText.text = imageDesc;
}
};
currentThumbnail.onRollOver = function() {
if (this != activethumb) {
this.attachMovie("Darken_mc","Darken_mc",this.getN extHighestDepth());
}
}
currentThumbnail.onRollOut = function() {
if (this != activethumb) {
this.Darken_mc.removeMovieClip();
}
}
};
View Replies !
View Related
Flash Image Gallery Thumbnail Scroll Sometimes Works...
this is probably an easy fix but i am at odds... I built my gallery and import it a parent page (foo)... Sometimes the scroll of thumbnail scroll works... it is choppy.... Sometimes does not work at all.... When i view the movie outside of foo - it works beautifully... Any ideas how to troubleshoot this - i took it word for word from the tutorial...
Thanks!
View Replies !
View Related
[Flash CS3] Help Getting XML Photo Gallery To Adapt To Different Thumbnail Size
NOTE: This is all done using AS2
So after studying the wonderful tutorial on how to use XML to make a photo gallery, I made one. And it loads and everything The problem comes in when I try and load thumbnails that consist of landscape AND portrait (tall) orientation.
The thumbnails will sometimes overlap. I can increase the space between the thumbnails, but it looks a little wonky when I do that (LARGE gaps sometimes between pictures).
Any idea on how to programatically have Flash find the width of each thumbnail loaded and space the next one based on that amount?
Here's my code:
Code:
function photoLoader() {
var Album = photos_xml.firstChild.childNodes;
for (i=0; i< Album.length; i++) { //This cycles through the XML document picture nodes
var currentPic = Album[i];
var currentThumb_mc = thumb_viewer.createEmptyMovieClip("thumbnail_mc"+i, i);//Tells our thumnail viewer to create an empty movie clip
currentThumb_mc._y = i * thumb_spacing;
currentThumb_mc.createEmptyMovieClip("thumb_container", 0);//That empty movie clip we made creates its on clip inside itself to hold the thumbnail
currentThumb_mc.thumb_container.loadMovie(currentPic.attributes.thumb);//This loads the thumbnail in our inner clip
trace(currentThumb_mc.thumb_container._height);
//This creates the variables "title" and "image" to store the title and image info from the XML file for each thumbnail
currentThumb_mc.title = currentPic.attributes.title;
currentThumb_mc.image = currentPic.attributes.image;
var blanky:String = "";
currentThumb_mc.onRollOver = cuurentThumb_mc.onDragOver = function() {
photo_caption.text = this.title;
this._alpha = 50;
thumbScroller();
}
currentThumb_mc.onRollOut = currentThumb_mc.onDragOut = function() {
photo_caption.text = blanky;
this._alpha = 100;
}
currentThumb_mc.onRelease = function() {
photo_viewer.load(this.image);
progBar._visible = true;
}
}
}
The variable thumb_spacing is defined outside of the function earlier and is set to 60.
I apologize if there's a BUNCH of comments throughout - I tend to forget stuff easily, so it helps when I come back to stuff and its labeled
View Replies !
View Related
[f8]Movie Clip Thumbnail Gallery - Lock _ymouse - Can This Be Done In Flash?
Here's the swf: http://208.131.133.122/flash/
And my fla: http://208.131.133.122/flash/scene.fla (8MB sorry!)
Right now, when the mouse is in the same _x position as the last thumbnail, the thumbnails slide gently to the left to reveal more thumbnails then slide back to the right when the mouse moves to the left again.
The problem is that they start sliding to the left whether or not the mouse is over the thumbnail gallery. If the mouse is at the bottom of the screen or the top of the screen and in the same _x position as the last thumbnail, they will begin sliding.
I would like the thumbnails to begin sliding only when the mouse hovers over the row of thumbnails and not when it is outside that thumbnail area.
I added some actionscript to stop the movement of the movieclip when the mouse is above the max or below the min _y position of the clip; but, it does not work.
I don't really know what I'm doing. Can someone.... anyone... tell me if this is something that can be done? And if yes, how?
Much thanks in advance.
View Replies !
View Related
Thumbnail Gallery Tutorial - Gallery Within Movieclip
I've taken the Adding Thumbnail tutorial http://www.kirupa.com/developer/mx2004/thumbnails.htm and it works perfect. However when I play the photogallery swf file within a movie clip (playing as externail swf from main timeline) and the gallery pulls up. The links work and all is good. All until I try and scroll to more thumbnail files. It's now scrolling. Scrolls fine when swf played indendently.
This couldn't have come a worse time as my finals are due in hours.
Please help if you can.
Thanks
View Replies !
View Related
Thumbnail Gallery
Hi,
I'm following the manual given below here:
http://www.mr10.net/components/gallery/manual/#thesetup
which sets up a thumbnail gallery by calling an xml file.
the gallery is working fine. It's just that i want the bigger images to be clickable and should open in a pop up window. Also i want some description to be added below the bigger images.
Any AS gurus pls help!!!!!
View Replies !
View Related
MX - Xml Thumbnail Gallery
Hello, I hope someone can spare a little time to help me. I am building a xml photogallery which displays thumbnails which you click on to display a larger pic. The code below displays the the pics for <section name="fashion" id="1"> i need to make a button which when clicked displays the pics for <section name="advertising" id="2">
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xml>
<gallery>
<section name="fashion" id="1">
<pictures>
<PICTURE NAME="1" THUMB="tn/tn_fashion_01.jpg" IMAGE="pics/fashion_1_p.jpg" TEXT="test1" />
<PICTURE NAME="2" THUMB="tn/tn_fashion_02.jpg" IMAGE="pics/fashion_2_p.jpg" TEXT="test2" />
<PICTURE NAME="3" THUMB="tn/tn_fashion_03.jpg" IMAGE="pics/fashion_3_p.jpg" TEXT="test3" />
</pictures>
</section>
<section name="advertising" id="2">
<pictures>
<PICTURE NAME="1" THUMB="tn/tn_advertising_01.jpg" IMAGE="pics/advertising_1_p.jpg" TEXT="test1" />
<PICTURE NAME="2" THUMB="tn/tn_advertising_02.jpg" IMAGE="pics/advertising_2_p.jpg" TEXT="test2" />
<PICTURE NAME="3" THUMB="tn/tn_advertising_03.jpg" IMAGE="pics/advertising_3_p.jpg" TEXT="test3" />
</pictures>
</section>
</gallery>
</xml>
and here is the AS
Code:
portfolioInfo = new XML();
portfolioInfo.ignoreWhite = true;
timeline = this;
portfolioInfo.onLoad = function() {
portfolioTag = this.firstChild.firstChild.firstChild.firstChild;
trace(count=portfolioTag.childNodes.length);
for (child=0; child<count; child++) {
currentPicture = portfolioTag.childNodes[child];
currentThumb = menu_mc.createEmptyMovieClip("thumbnail"+child, child);
currentThumb._y = child*75;
image = currentThumb.createEmptyMovieClip("thumbnail_image", 0);
image.loadMovie(currentPicture.attributes.THUMB);
currentThumb.NAME = currentPicture.attributes.NAME;
currentThumb.IMAGE = currentPicture.attributes.IMAGE;
//currentThumb.TEXT = currentPicture.attributes.TEXT;
currentThumb.onRollOver = currentThumb.onDragOver=function () { showName_txt.text = this.NAME;};
currentThumb.onRollOut = currentThumb.onDragOut=function () { showName_txt.text = "";};
currentThumb.onPress = currentThumb.onDragOver=function () { image_mc.loadMovie(this.IMAGE);info_txt.text = "Loading...";};
}
};
portfolioInfo.load("xml_slide.xml");
any help much appreciated
cheers
View Replies !
View Related
Thumbnail Gallery
Does anyone know where I could possibly find a good thumbnail gallery tutorial? I am looking for one that has a scrollable thumbnail box with a meduim size image to be viewed when u rollover the thumbnail!
Thanks,
Andy
_
View Replies !
View Related
[F8] Xml Thumbnail Gallery
Hi, I'm making a scrollable thumbnail gallery but I want to load the images into from an XML file. I'm having trouble setting up with emptyMovieClip's in the right position.
Code:
import mx.managers.DepthManager;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function() {
var numOfItems:Number = this.firstChild.childNodes[0].childNodes.length;
for (i=0; i<numOfItems; i++){
var xPosition:Number = 11+(i*80);
createEmptyMovieClip("image"+i, this.setDepthTo(i+1), {_x:xPosition, _y:4});
var thisItem:String = this.firstChild.childNodes[0].childNodes[i].attributes.image;
var nameOfItem:String = load +i;
nameOfItem:MovieClipLoader = new MovieClipLoader();
nameOfItem.loadClip(thisItem, "image"+i);
}
}
xml.load("menu.xml");
This is the code I am using. It opens up an xml file called 'menu.xml' and is supposed to add a certain amount of emptyMovieClips to the stage. Then the correct image is loaded into this movieclip.
At the moment I just get the last image from the xml doc showing up. That proves the images are loading but it's not positioned correctly. So either it is above the previously created movieclips or they have all loaded into the same one!
Can you please advise on how to correct this?
View Replies !
View Related
XML Thumbnail Gallery
Hi Actionscripters,
I am encountering a few uncertainties with an xml thumbnail gallery that I have adapted from a few tutorials. I have two questions about this piece of actionscript:
Code:
var thumb_spacing = 30;
// load variables object to handle loading of text
var description_lv = new LoadVars();
description_lv.onData = function(raw_text){
description_txt.text = raw_text;
}
function GeneratePortfolio(portfolio_xml){
var portfolioPictures = portfolio_xml.firstChild.childNodes;
for (var i = 0; i < portfolioPictures.length; i++){
var currentPicture = portfolioPictures[i];
var currentThumb_mc = menu_mc.createEmptyMovieClip("thumbnail_mc"+i,i);
currentThumb_mc._x = i * thumb_spacing;
currentThumb_mc._y = i * thumb_spacing;
currentThumb_mc.createEmptyMovieClip("thumb_container",0);
currentThumb_mc.thumb_container.loadMovie(currentPicture.attributes.thumb);
currentThumb_mc.title = currentPicture.attributes.title;
currentThumb_mc.image = currentPicture.attributes.image;
currentThumb_mc.description = currentPicture.attributes.description;
currentThumb_mc.onRollOver = function(){
currentThumb_mc.thumb_container._alpha = 50;
}
currentThumb_mc.onRollOut = function(){
currentThumb_mc.thumb_container._alpha = 100;
}
currentThumb_mc.onRelease = function(){
image_mc.loadPhoto(this.image);
description_lv.load(this.description);
title_lv.load(this.title);
}
}
}
Firstly, I would like to create a box of thumbnails which is 5 thumbs wide and 6 thumbs deep, my current code is generating thumbs downwards in a diagonal line from the top left of the movie clip. I understand this is because of the coordinates that I have specified in my variable are:
Code:
currentThumb_mc._x = i * thumb_spacing;
currentThumb_mc._y = i * thumb_spacing;
Q1: How do I get the thumbs to wrap from the end of one row to the beginning of the row below?
Secondly, I would like the thumbs to have an alpha value of 50% on rollover. My current script does this, but only on the last thumb - no matter which thumb the pointer is 'over'.
Q2: I am not sure how to target the dynamicly created movie clips acturately. How do I solve this problem?
Many thanks for any help on this. It is my first attempt at dynamically loading data in to flash
View Replies !
View Related
Thumbnail Gallery
Hi,
I want to create a thumbnail gallery with images loaded in at run-time. Can an flash actionscript be passed variables at run-time. I want the actionscript to recieve filename(s) as a variable so it knows what to display.
View Replies !
View Related
Xml Thumbnail Gallery Help
Hi I am building an online gallery for my artist friend, after much trouble it is working in the basic way but there are 2 refinements i would like to make. any help with either or both would be useful.
here's where i am at at the mo...http://www.bru-ha.com/roza-flash/art_7.swf
the gallery loads images text and thumbs from an XML file as you can see, at present the thumbs have very simple scripting that sets the alpha to 50% on load, on mouse over this then jumps to 100%. I would like to make this a gradual transition from 50 to 100 on mouseover and mouseout, but i cannot figure what code to use. i thought it would be a simple if statement but my programming knowledge is very basic.. any ideas anyone?
here is the actionscript:
Code:
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc._alpha = 50;
target_mc.onRollOver = function() {
target_mc._alpha = 100;
};
target_mc.onRollOut = function() {
this._alpha = 50;
};
the other matter i would love help in is positioning the thumbnails, there will be 14 different pages like this for 14 bits of work, each having different numbers of thumbnails, is it possible in actioscript to center the thumbnails to the middle of the page instead of them being justified left?
here is the code which i think would need to be aaltered to do this.
Code:
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(eval("thumbnail_mc.t"+k)._width+10)*k;
target_mc.pictureValue = k;
View Replies !
View Related
Help With Thumbnail Gallery
I did a gallery tutorial and I added some extras but me being a total newbie to AS. I didn't know how to make this easier for me .
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
// For the XML to load.
var xml:XML = new XML();
xml.ignoreWhite = true;
var urls:Array = new Array();
var captions:Array = new Array();
var whoIsOn:Number;
xml.onLoad = function() {
var photo:Array = this.firstChild.childNodes;
for (i = 0; i < photo.length; i++) {
urls.push(photo[i].attributes.url);
captions.push(photo[i].attributes.caption);
}
holder.loadMovie(urls[0]);
caption.text = captions[0];
whoIsOn = 0;
};
xml.load("image.xml");
// This is for the PANEL .
panel.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
var b = stroke.getBounds(_root);
function scrollPanel() {
if (_xmouse < b.xMin || _xmouse > b.xMax || _ymouse < b.yMin || _ymouse > b.yMax) {
this.onRollOver = panelOver;
delete this.onEnterFrame;
}
if (panel._x >= 50) {
panel._x = 50;
}
if (panel._x <= -2529) {
panel._x = -2529;
}
var xdist = _xmouse - 400;
panel._x += Math.round(-xdist / 20);
}
prev.onRelease = function() {
if (whoIsOn > 0) {
whoIsOn--;
holder.loadMovie(urls[whoIsOn]);
caption.text = captions[whoIsOn];
}
};
next.onRelease = function() {
if (whoIsOn < urls.length - 1) {
whoIsOn++;
holder.loadMovie(urls[whoIsOn]);
caption.text = captions[whoIsOn];
}
};
I have 66+ images(movieClips) I used the code below for each movieClip.
Code:
panel.s1.onRollOver = function() {
panel.s1.swapDepths(this.getNextHighestDepth());
new Tween(panel.s1, '_xscale', Elastic.easeOut, panel.s1._xscale, 100, 1, true);
new Tween(panel.s1, '_yscale', Elastic.easeOut, panel.s1._yscale, 100, 1, true);
};
panel.s1.onRollOut = function() {
new Tween(panel.s1, '_xscale', Elastic.easeOut, panel.s1._xscale, 50, 1, true);
new Tween(panel.s1, '_yscale', Elastic.easeOut, panel.s1._yscale, 50, 1, true);
};
panel.s1.onRelease = function() {
holder.loadMovie('images/l1.jpg');
};
panel.s2.onRollOver = function() {
panel.s2.swapDepths(this.getNextHighestDepth());
new Tween(panel.s2, '_xscale', Elastic.easeOut, panel.s2._xscale, 100, 1, true);
new Tween(panel.s2, '_yscale', Elastic.easeOut, panel.s2._yscale, 100, 1, true);
};
panel.s2.onRollOut = function() {
new Tween(panel.s2, '_xscale', Elastic.easeOut, panel.s2._xscale, 50, 1, true);
new Tween(panel.s2, '_yscale', Elastic.easeOut, panel.s2._yscale, 50, 1, true);
};
panel.s2.onRelease = function() {
holder.loadMovie('images/l2.jpg');
};
my .fla can be found here.
to view what I'm working on is here.
View Replies !
View Related
Thumbnail Gallery Help
Hi,
Being trying to figure this out, but i'm obviously missing something ... my brain is way too worn out after a whole day of coding ...
I'm trying to dynamically create a serious of thumbnails on author time.
I know basically what I need to do, but it's not quite working. First I'd like to create a container movieclip, then attach a button i have in the library, and finally load the thumbnail image inside the button.
So far, I have this:
total = 8 // total num images to load
smallposx = 165;
smallposy = 20.95;
this.createEmptyMovieClip("large", 0);
large._x = 7;
large._y = 10.45;
large.loadMovie("../img/products/image1_l.jpg");
for (i=1; i<total+1; i++) {
this.createEmptyMovieClip("small"+i, this.getNextHighestDepth());
path = this["small"+i];
path.attachMovie("button", "button"+i, this.getNextHighestDepth());
button= this["button"+i];
path.button.thumb.loadMovie("../img/products/image+i+"_s.jpg");
path._x = smallposx;
path._y = smallposy;
_root.smallposx += 50;
}
Note: "thumb" is a mc inside the dynamically attached button instance which has an instance name of "thumb".
Anyone can suggest a solution or an optimized new approach?
Thanks a mill!
View Replies !
View Related
Help With Thumbnail Gallery
Hi all,
I'm a noob programmer trying to learn Flash by building my own site (www.davidfoleyjr.net). For the Pics portion of the site, I'm trying to create a loader that brings up a category-specific set of thumbnails into the loader window, which the user would then scroll over (or click, if necessary) to bring up the full sized picture. Can this be done? Any help would be greatly appreciated!
View Replies !
View Related
Thumbnail Gallery
Hi, I am trying to create a thumbnail gallery in Flash 9 (alpha) with AS 3.0.
I am not creating from scratch. Before i have created the same in AS2.
just migrating that to AS3.
There is a main movie for large image. (working fine)
two button [previous] and [next] for large image navigation.(working fine)
one thumbnail movie to load all thumnail images (problem)
I am not getting how to load thumbnail images in AS3?
Please Help.
View Replies !
View Related
Using Xml Within Thumbnail Gallery
I'm creating a portfolio of websites I have designed.
I have it working with classic ASP & XML, but want a Flash version too.
So far:
1) I have a sliding thumbnail gallery working in Flash MX (using AS2) whereby clicking on thumbnails loads in a larger view of the image. These images are screenshots of the websites.
2) I have loaded an xml file which contains locations of thumbnails & larger images, as well as URL of each website, and some text to describe each site's content. I am able to loop through the xml to retrieve the data I need for each site.
I would now like to merge the 2.
i.e. click on thumbnail to slide in the larger image, and dynamically add the URL and text descriptions for each site.
Can someone just point me in the right direction... I'll then try to fill in the blanks, and post again with more specific queries if needed.
Thanks.
View Replies !
View Related
Thumbnail Gallery - Another
http://www.fmx6.com/tfile1a.html
with transition
http://www.fmx6.com/tfile1origa.html
Uses XML to split into different sections so you can put in as many rows/thumbs in each row as necessary.Change the 4 variables at the beginning of the code for the _width/_height/vertical spacing/horizontal spacing of your final gallery.
I`ve not put transition/preloader to try keep the code simple but is easy to add.
Made for someone on here asking for something like the porfolio thing here
http://www.firstbornmultimedia.com/flashLarge.htm
edit/I`ve added a transition as per pm request for sumtan - thanks to Scotty for making this so much easier with his elastic curve post
http://www.kirupa.com/forum/showthread.php?t=96402
View Replies !
View Related
Thumbnail Gallery Help Please
hey i am having problems getting the thumbnail slider to work in my gallery. I have followed the instructions in the tutorial but unfortunately still it doesn't work. the only thing that i changed was the position of the gallery. it is also situated in a movieclip in my swf file. can anyone help me get back on track?
heres the fla and xml files.
http://66.195.242.57/~tenroun/ali/foff/_gallery.fla
http://66.195.242.57/~tenroun/ali/foff/images.xml
View Replies !
View Related
XML THUMBNAIL Gallery HELP
I NEED SOME HELP!!!
Ok, I took this gallery..... http://www.kirupa.com/developer/mx2004/thumbnails.htm
and reverse coded it to how I want it to look and function. But, there are a couple of things I couldn't figure out. If anyone can help with any of this, that would be awesome!
1. when clicking on a ring circle, i need the alpha to change and to stay to show that the ring circle has been previously clicked on. (check out thinklab.com for reference)
right now i have it set where when you rollover the alpha is 50 to show currently what ring circle your mouse is on. now all i need is if you were to click on that same ring circle, for the alpha to be at 25 (and stay that way) to show it grayed out because it has already been clicked on. this in return shows users what ring circles are left to click on if they have missed any.
2. when hitting back or next, it would be great if the alpha changed for the correct ring circle to show the user what image he/she is currently on. i'd say alpha 50 for this.
3. every image that loads is stuck to the left, anyway to make it on the right instead?
4. last one, if there's a way to make it so that when the image loads, it fades in. i know this is controlled by alpha also.
if ANYBODY could help me with the coding that would be awesome. i've included a zip file with the neccessary files. if any of this is confusing, just PM me or reply here.
View Replies !
View Related
XML Thumbnail Gallery
Good day,
for all of the searches ive made.. a link drop me here.. many thanks to this website.. it really helps me alot.. with tons of tutorials and samples... i am new to AS and seems like this website makes me a bit pro..
Anyways, most of i like here is the xml gallery.. i have created my own using the tutorial "Photo Gallery using XML and Flash".. ive learned a lot...but the thing is the gallery ive created is just a thumbnail no preview at the top of the thumbnail...the thumbnail ive created works fine to me..sliding left and right following the mouse direction.. in "Adding thumbnail" tutorial, when click on the image in the thumbnail it will show a large view of the image in the top portion of the movie.. what my work is, when i click on the image it supposed to link on a URL. but i dont know how to make this using XML.. and how to link the URL in XML to the thumbnail...
is it possible to put URL inside xml to a certain node...then linking that url when the button is click in the movie??
sample:
Code:
<images>
<pic>
<image>img1.swf</image>
<url>http://www.myhome.com/page1.htm</url>
</pic>
<pic>
<image>img2.swf</image>
<url>http://www.myhome.com/page2.htm</url>
</pic>
</images>
any help will be appreciated...
View Replies !
View Related
Help On XML Gallery Thumbnail
i would like to add some text into the thumbnail from this tutorial http://www.kirupa.com/developer/mx2004/thumbnails.htm. so is easy to know what is the thumbnail is
the text is load from XML so is easy to edit.
Can someone help me??
View Replies !
View Related
Xml Thumbnail Gallery
I'm using the V3_multigal_dynamic resizing gallery, but I want each of the thumbnails to loadMovieNum rather than loading a photo. The resize is unnecessary. All I really want is an xml thumbnail gallery that loads an swf rather than a photo. All I could find were galleries. This is the code I'm using now. Any help would be appreciated. Thanks!
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();
bar._visible = 1;
per = Math.round((l/t)*100);
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);
bar._visible = 0;
picinfo.info.text = tArray[pic];
containerMC._alpha = 0;
delete this.onEnterFrame;
} else {
bar._width = per;
picinfo.info.text = per+"%";
}
};
};
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;
}
}
};
};
var galLength;
my_xml = new XML();
my_obj = new Object();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(loaded) {
if (loaded) {
var galleries = this.firstChild.childNodes;
galLength = galleries.length;
for (var i = 0; i<galLength; i++) {
my_obj[i] = new Object();
my_obj[i].nodes = galleries[i].childNodes;
var gal_btn = nav_gal.attachMovie("gal_btn", "gal_btn"+i, i);
gal_btn._y = i*20;
gal_btn.label.text = galleries[i].attributes.name;
gal_btn.label.autoSize = true;
gal_btn.bg._width = gal_btn.label._width;
gal_btn.id = i;
gal_btn.onRelease = function() {
galleryChoice(this.id);
disButtons(this.id);
};
}
}
galleryChoice(0);
disButtons(0);
};
my_xml.load("thumbTest.xml");
function galleryChoice(q) {
tArray = [];
pArray = [];
iArray = [];
for (var j = 0; j<curLength; j++) {
this.th_nav["thmb"+j].removeMovieClip();
}
gallery = my_obj[q].nodes;
curLength = gallery.length;
for (var i = 0; i<gallery.length; i++) {
pArray.push(gallery[i].attributes.source);
tArray.push(gallery[i].attributes.thumb);
iArray.push(gallery[i].attributes.title);
}
delay = setInterval(makeButtons, 50);
}
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%3*50;
thb._y = Math.floor(i/3)*50;
}
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);
}
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 = 50;
}
}
}
function disButtons(d) {
for (var i = 0; i<galLength; i++) {
var but = nav_gal["gal_btn"+i];
if (i != d) {
but.enabled = 1;
but.gotoAndStop(1);
} else {
but.enabled = 0;
but.gotoAndStop(2);
}
}
}
View Replies !
View Related
Thumbnail Gallery Help
Of course, like most I am a beginner to as, Flash, etc. I've just completed the wonderful, and I guess pretty famous "Photo Gallery Using XML and Flash" with thumbnails tutorial (it's the best on the web!). Everything is working fine, after some spell checks and other careless mistakes; however, for the gallery page I'm designing I'd like to add another scrolling library so that I will have 2 scrolling gallery thumbnail bars. I'd like gallery #2 to also load into the "picture" movie clip and of course knock out the gallery #1 thumnails and vice-versa. Is this possible? If it is, is this murder for a newbie like myself? Any suggestions or help would be greatly appreciated. Thanks for your time!!>>>><<<<<
View Replies !
View Related
XML Thumbnail Gallery Help
I’ve been working on this photo gallery code and got it working for the most part except for one thing. When you click on two thumbnail images, one right after they other the main image area fades away. In line 239 is where I think my problem begins. I can’t figure out how to fix this problem besides that the gallery works fine. I also wasn’t sure if the way I wrote the code was efficient. So anyone is free to make any changes or suggestions to make the code better, just please post it back to share with everyone. Download the attachment and unzip it, run the flash file and it should be working. When you unzip the file you will see a gs file. It’s a flash tween engine that works great, find out more about it on http://blog.greensock.com/tweenmaxas3/.
Download the zip file here!
View Replies !
View Related
Thumbnail Gallery
guys i have an issue that has been kicking my butt for the last week. I am trying to create a thumbnail gallery. i have my images dynamically declared.
before i break down my issues. let me break down how this file is set up.
first ( and dont worry about this part) I am using some of the yahoo astra components in this fla. (if you dont know about them.... go check them out!)
ok so now...
on the main stage i have just my tabs. which work well no issues there.
i have 5 movie clips. each of those clips corresponds to a tab on my main stage.
those 5 movie clips are holders for a scroll components.
now the interesting part...
the movie clips for the scroll panes sources
contains yahoo tile pane (basically it spaces all my images in row and tiles)
I dynamically declared all of my images and dynamically placed the tilepane (called pane) into its movie clip.
var _baseball:baseball = new baseball(); (i set up my linkage for each image in the library)
pane.addChild(_baseball);
i test the movie and i can switch between my tabs and see their images
now comes the problem( if you are still reading all this)
I am trying to figure out where i place my eventlisteners so that when an image is clicked i can show it on some kind of loader.
my second problem is idk what kind of loader these files are supposed to load into ( they are static images)
and my last problem is getting images to disappear as a new image is clicked.
PLEASE HELP ME!!! I have been looking at this for over a week and still cant figure it out. I have to be honest, I totally new to AS3 and I am diligently trying to make my first app in flash as3.
View Replies !
View Related
Mr 10'd Thumbnail Gallery Help?
Is anyone using the Thumbnail gallery that you can download from flash components created by mr 10?
I've managed to get the gallery working but I am unable to get text to appear when you click on each thuimbnail. I would like to display the images title.
View Replies !
View Related
XML GALLERY THUMBNAIL
hi,
i'm trying to do one small thing on a code that already works.
This is the code:
Code:
myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
//portfolioTag = this.firstChild;
numimages = this.firstChild.childNodes.length;
spacing = 50;
for (i=0; i<numimages; i++) {
this.picHolder = this.firstChild.childNodes[i];
this.thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
this.thumbHolder._y = i*spacing;
this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
this.thumbLoader.loadMovie(this.picHolder.attributes.thmb);
this.thumbHolder.title = this.picHolder.attributes.title;
this.thumbHolder.main = this.picHolder.attributes.main;
this.thumbHolder.onRelease = function() {
loader.loadMovie(this.main);
title_txt.text = this.title;
};
}
};
myPhoto.load("xmlphoto.xml");
what it does is that it loads thumbnails into a mc and positions all of them with an X distance in the _y position
i'm trying to determine an _y area, and if the thumbnails are bigger then the _y area they will start another row with an _x = 20 (ex.)
Does anyone have a solutions, even if its not the one i suggested?
View Replies !
View Related
Sliding MC Thumbnail Gallery
I need help with Action Script. Being very, very new to this... I'm trying to create a sliding thumbnail gallery realitive to the position of the user's mouse, on the rollover ...simliar to this example:
www.angelicgrove.com --- (if you click on weddings, etc.)
Any help/thoughts?
View Replies !
View Related
Thumbnail Gallery In Scroll Bar Box
Hello:
I don't even know if this is possible but this is what I'm looking for. I want to have a Scroll Bar Box that contains numerous thumbnail pictures where the person can click on the thumbnail and display the larger version on the otehr side of frame. Is this possible? I already knwo how to link the thumbnail to another frame, but just not sure on how to get thumbails in a scroll bar box.
Jonathan
View Replies !
View Related
|