Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Issue With Preloader Bar In Thumbnail/gallery



Hey all, Been searching the forums for anything that would help me out with this issue but havent had much luck. I'm hoping someone can shed some light. I have a site that loads seperate .swf files for the different sections (Ie. Info, gallery, Etc.) everything is running fine except for this small issue I'm having with the preloader bar for the images/thumbnails itself. (the're actually 2 preloaders in the photo .swf file, the one that is used when the whole movie is being loaded and the one for the photos/thumbnails.) When I run the .swf file offline simulating download speed the preloader bar and percentage text updates as the tumbnails are loading an gets to 100% when it completes loading all the thumbnails and the first image. (as I expect it to work)Now when I run the .swf online the preloader doesn't update while loading the thumbsnails and the first image, but once it has complete downloading them and you go to another image via the next/prev button or by selecting a thumbnail then the preloader bar and text works fine. I used the tutorial on adding thumbnails to gallery as the base for the photo section so the code should be familiar to some:
PHP Code:


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("images.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();//this.preloader._visible = true;if (loaded != filesize) {this.preloader.preload_bar._xscale = 100*loaded/filesize;this.preloader.preloader_text = Math.round(100*loaded/filesize)+"%";this.preloader._visible = true;} else {this.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);gallery_txt.desc_txt.text = description[p];picture_num();}}}function prevImage() {if (p>0) {p--;picture._alpha = 0;picture.loadMovie(image[p], 1);gallery_txt.desc_txt.text = description[p];picture_num();}}function firstImage() {if (loaded == filesize) {picture._alpha = 0;picture.loadMovie(image[0], 1);gallery_txt.desc_txt.text = description[0];picture_num();}}function picture_num() {current_pos = p+1;gallery_txt.pos_txt.text = current_pos+" / "+total;}function thumbNailScroller() {// thumbnail code! this.createEmptyMovieClip("tscroller",1000);scroll_speed = 12;tscroller.onEnterFrame = function() {//added x to _mc to fix bracketing issueif ((this._xmouse>=thumbnail_mcx._x) && (this._xmouse<=thumbnail_mcx._x+thumbnail_mcx._width)) {if ((mouse_mc.hitTest(hit_right)) && (thumbnail_mc.hitTest(hit_right))) {thumbnail_mc._y -= scroll_speed;} else if ((mouse_mc.hitTest(hit_left)) && (thumbnail_mc.hitTest(hit_left))) {thumbnail_mc._y += 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._y = hit_left._y+(target_mc._height+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);}stop();close_btn.onRelease = function(){masktop.gotoAndPlay("exit");maskbot.gotoAndPlay("exit");maskthumbs.gotoAndPlay("exit");} 



If it will help I've put the site up at the following address: testsite.crsairsoft.com Any help with this would be appreciated.



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 09-29-2006, 06:02 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Xml Thumbnail Gallery Issue
Hi...I posted this already in Flash CS3 forum but didn't get any replies. Maybe someone here can help... I've gotta have this finished by Thursday night.

I've got a website with three links to three different thumbnail galleries. When I click the link to a gallery that has a lesser number of thumbnails, it fills the difference in numbers in with thumbnails from the previous gallery. If anyone knows ANY reason why this might be happening, I would GREATLY appreciate your help. Thanks so much!

Kirupa Thumbnail Gallery Issue
HI all, Im using the thumbnail gallery in my personal site. When I open the SWF alone it works fine. But when I insert into a movieclip using LoadMovie it doesnt work so well... The scroller doesnt go back, it only scrolls to one direction, and does not stop properly.. any ideas? heres the link for my site:

http://www.electricskin.co.uk/

you can see the thumbnail gallery working nicely by itself on:

http://www.electricskin.co.uk/myGallery.swf

Is there a way of getting the SWF to appear at the right place, without using loadMovie ? or a way of making it work okay inside a movieclip? I havent changed the code at all, u can see it in the main tutorial page of kirupa... Thanks, B

Xml Thumbnail Gallery Issue Xml Not Loading
Ok so i have looked thru the forums for the past two days trying to solve my issue and i didnt find anything that works. I have the xml thumbnail gallery from the site working here.Its the base code except i change some things so that it would work if i loaded with the mxloader component into another movie. When i try and do so the XML file doesnt load. you can see this here. Im not sure if theres something else that i need to do to make this work or what, but i cant seem to figure it out. all the paths are absolute paths (http://ect...). and even stranger is that it worked like 3 or 4 times when i first started then stopped working. so i dont know if its a server issue or if im overlooking something. I am new to the whole AS thing so be gentle.... Any help with this would be great.

Thanks

Thumbnail Preloader XML Gallery
Hello,

does anybody knows how to build a preloader for each thumbnail for the XML gallery ?

Thanks in advance,

Flasher7

Preloader Thumbnail Gallery
Is there anyone who can provide code (help out) to add a preloader for the thumbs on this great kirupa gallery found here:

http://www.kirupa.com/developer/mx2004/thumbnails.htm

A preloadbar and percentage loader if possible. Big thx in advance. Grtz

Kirupa XML Thumbnail Gallery... Preloader For Thumbnails?
Hey all!
I'm getting quite comfortable with the XML thumbnail gallery here on the Kirupa site... but wondered if there was an easy way to have a preloader for the thumbnails? I don't really have an idea how to set up the code for that. thanks!!

Xml Gallery…preloader Issue.
I just made my gallery works, but I still have a little problem.My preloader is not working.

I tried with other kinds of preloaders, but they didn't work.

Would you mind taking a look at the code?

I inserted the code to the onRelease function, is it valid?
Can I do this?


Code:
drawRect = function (w, h) {
this.beginFill(0x999999, 100);
this.moveTo(0, 0);
this.lineTo(0+w, 0);
this.lineTo(0+w, 0+h);
this.lineTo(0, 0+h);
this.lineTo(0, 0);
this.endFill();
};
bar._visible = false;
bar._xscale = 0;
function GeneratePortfolio(portfolio_xml) {
var portfolioPictures = portfolio_xml.firstChild.childNodes;
noclips = portfolioPictures.length;
for (var i = 0; i<noclips; i++) {
var currentPicture = portfolioPictures[i];
var mc = this.createEmptyMovieClip("mc5"+i, i);
col = 5;
row = 5;
wi = 20;
hi = 20;
cuenta = 0;
for (x=0; x<col; x++) {
for (y=0; y<row; y++) {
this["mc5"+cuenta]._x = 105+wi*x;
this["mc5"+cuenta]._y = 230+hi*y;
this["mc5"+cuenta]._alpha = 75;
cuenta++;
}
}
drawRect.apply(mc, [15, 15]);
mc.title = currentPicture.attributes.title;
mc.image = currentPicture.attributes.image;
mc.thumb = currentPicture.attributes.thumb;
mc.onRollOver = mc.onDragOver=function () {
this._alpha = 100;
};
mc.onRollOut = mc.onDragOut=function () {
this._alpha = 75;
};
mc.onRelease = function() {
_root.disappear(_root.images, 0);
bytes_loaded = Math.round(mc.getBytesLoaded());
bytes_total = Math.round(mc.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
_root.pictureit.loadMovie(this.image);
}
var colorful = new Color(this);
colorful.setRGB(0x666666);
};
}
}
var portfolio_xml = new XML();
portfolio_xml.ignoreWhite = true;
portfolio_xml.onLoad = function(success) {
if (success) {
GeneratePortfolio(portfolio_xml);
} else {
trace("error");
}
};
portfolio_xml.load("images.xml");
Thanks in advanced.

Xml Thumbnail Gallery - How To Leave Thumbnail Blank?
There was a thread a few days ago on how to leave the caption or description blank. If anyone knows could you explain how to leave the thumbnail and/or url blank for some and to show for others? Where if there is no information that flash can read a field that is undefined as ""?

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

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

Thumbnail Issue
i am building a gallery site that loads thumbnails and big images using variables on a text doc. the problem i am getting is every now and then, the thumbnails dont load. its more frustrating because its tough to replicate the error but it really undermines the whole project and i just cant figure out whats making it get stuck. help on this would be greatly appreciated as the project is overdue, etc, etc.

www.jeremydown.com/

go into "work" and then pick either past or present, if the thumbs dont load, then you have successfully replicated the error. here is the code that is on the thumbnails. there is also a text doc with the variables that gets loaded just before the movie with the thumbnails.

onClipEvent (load) {
initial = "pr";
thenumber = 1;
thumbnail = initial + thenumber;
thumbimage = "thumb" + thumbnail;
loadMovie("images/" + _root.galleries[thumbimage], _root.galleries[thumbnail].blank)

if (_root.galleries[thumbnail].blank.myBytes == 100) {
// will target the var myBytes, similar to a global
// trace("movie is loaded");
_root.galleries[thumbnail].blank._visible = true;
_root.galleries[thumbnail].blank._width = 26;
_root.galleries[thumbnail].blank._height = 26;
percentText._visible = false;
trace ("not working");
} else {
_root.galleries[thumbnail].blank._visible = false;
percentText._visible = true;
trace ("working");
}
}

on(rollOver){
_root.overhigh.play();
}

on(release){
bigimage = "image" + thumbnail;
textframe = "t" + thenumber;
if (currentimage != thumbnail)
_root.galleries.preloader.gotoAndStop(2);
loadMovie("images/" + _root.galleries[bigimage], _root.galleries.imageholder)
currentimage = thumbnail;
_root.click.play();
_root.galleries.textloader.gotoAndStop([textframe]);
}


the error is visible on IE on Mac OS X and occassionaly on Safari. would it help to somehow load the thumbnails through some other method ? any tips on this would be a bonus...im dead in the water here.

Thumbnail Issue
Hello

In my Flash movie I have several thumbnail images. When I click on thumbnail 1 I get taken to a larger image of thumbnail 1 and an accompanying text. If I click on thumnail 2 I get taken to a larger image of thumbnail 2, but the text which goes with thumbnail 1. In fact, whichever thumbail I click on, I get a larger image of it, but always the text of thumbnail 1 - text for the other thumbnails does not exist.

How is it best to try to proceed to inserting individual text for each thumbail?

Thanks.

Steve

XML Thumbnail Issue.
I'm building a mock portfolio site that has a sliding thumbnail gallery. I completed the "adding thumbnails" tutorial from this site and it works fine. When i add it to the mock site. I get no thumbs. But, when i move the "hit_left" movie clip to the left edge of the stage, the thumbnails appear where they should. Upon scrolling, they scroll fine to the left, but then don't scroll back to the right. I made the stage on the .fla that i built the thumb gallery on as long as the mock .fla and the thumbs loaded fine. When i moved them to the right side of the stage, the same problem from the mock .fla happened. What do i need to do so they scroll correctly in the small space provided? The mock .fla, xml file, and the images are available at the links below.

http://www.mm214.com/kthomas/mock_portfolio.zip

Thank you for any help. A second pair of eyes is always nice at this time of night.

XML And Thumbnail Issue
Hi there,

I am trying for quite some days to figure out making a gallery like these.
What I would like to learn is to present the thumbnails in that way.

http://www.ciriljazbec.com/indexmain.php?xUrl=news [the portfolio]
http://www.versuz.be/[gallery/photos]

I am as far as to load the thumbnails dynamicaly in to a grid, but I can't set a maximum of thumbnails shown.

Can somebody please point me out or set me on the right track how I can show a maximum of lets say 9 thumbnails, if you click on the next button, the following nine will be shown, if there are only six left, there will only be shown 6.

thanks a lot

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!!!!!

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

I Need A Thumbnail Gallery Please Help?
Ok, I know how to build gallerys (to a point) but i need one that can load the 25 x 25px thumbnail gifs from the server. And I need an area to view the larger pix to the side.

If anyone could help me asap that would be amazing!!

Thank you!

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

_

[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?

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

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.

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;

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.

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!

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!

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.

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.

Flv Thumbnail Gallery
How can i load flv's into a Flv playback component, by pressing on a regular button ( not a playlist?? )
I'm really lost on this one, cant find any help about it tin the forums

Thumbnail Gallery
anyone knows or has a good thumbnail gallery for pictures ... an cool and easy to custmize one ...

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

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

XML/thumbnail Gallery Available For MX?
Does anyone know if the XML/thumbnail gallery tutorial is available for MX only?

If not, would anyone know if the AS included in the tutorial is okay for AS 1 for MX?

Thanks,
Donna

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.

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...

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??

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);
}
}
}

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!!>>>><<<<<

Thumbnail Gallery Help
ive been researching on making a thumbnail gallery that has an onhover effect like this site. can anyone help ?

http://www.amysol.com

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!

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.

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.

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?

Thumbnail Loading Issue
I have a web site that I am trying to debug. On the home page www.libertyfc.org there is a flash xml photo piece were the thumbnails don't load until you refresh the page. Now when I test the site locally on my machine the load correctly but from the server. I am looking for any suggestions or hints. I can't post the FLA because it's about 300K and to big for the forum. I guess what I don't understand is why the would load after you refresh the page?

Here is the code that loads the thumbnails maybe someone will see something I don't.

Code:
y_middle = Stage.height/2;
tn_group.tn._visible = false;
tn_group.setMask(tn_area);
tn_alpha_default = 100;
p = 0;
//trace("num of images in array = "+photo_thumbnail.length);

for (var i = 0; i<photo_thumbnail.length; i++) {
tn_group.tn.duplicateMovieClip("tn"+i,i);
tn_group["tn"+i].tn_pic.loadMovie(filepath+photo_thumbnail[i]);
tn_group["tn"+i]._x = tn._x;
if (photo_video[i] == "") {
//tn_group["tn"+i].vid_cover._visible = false;
tn_group["tn"+i].arrow._visible = false;
}
//trace("video= "+photo_video[i]);
//original fla photos were 100x90
//tn_group["tn"+i]._y = i * 100;
//set spacing : new photos will be 85x51
tn_group["tn"+i]._y = i*60;
tn_group["tn"+i].tn_pic._alpha = 100;
tn_group["tn"+i].tn_no = i;
//mouse btn functions
tn_group["tn"+i].tn_button.onRollOver = function() {
this._parent.tn_pic._alpha = 100;
};
tn_group["tn"+i].tn_button.onRollOut = function() {
this._parent.tn_pic._alpha = tn_alpha_default;
};
tn_group["tn"+i].tn_button.onRelease = function() {
_root.p = this._parent.tn_no;
gotoAndPlay("start");
//trace("video= "+photo_video[p]);
if (photo_video[p] != "") {
video = photo_video[p];
gotoAndPlay("video");
}
};
/**/
}

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.

Thumbnail Gallery Scroll Through
Would anyone know how to create a thumbnail gallery that uses only 2 scroll buttons to move through the gallery. Also including the use of actionscript

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?

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

Scrolling Thumbnail Gallery
I want to create a small gallery of images for a portfolio. I like the treatment used on http://www.sf49ers.com where you can click on the image to advance to the next image, although I'd probably do mine as a rollover. I can figure out the button to forward to the next image, but it's the back button that's thrown me for a loop. How do you get a movie clip to play "in reverse"? Also, how do you make the images repeat seamlessly. I'm guessing that it's two movie clips back to back, but I'm not sure.

Any suggestions would be greatly appreciated.

Thanks!!

FLA Thumbnail Gallery View?
Hi
Is there some way or programme I can view thumbnails of FLA files


Thanks
Cheers
Wayne

Copyright © 2005-08 www.BigResource.com, All rights reserved