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




Image Gallery Help



i am trying to make a image gallery and have some problems on the rollOver tween(scale)...the effect i want is to scale (tween) the movie clip in wich the picture is imported (loadmovie....) with AS but just cant get it to work.i've downloaded all kinds of image galleryes but it's too complicated for me (xml,actionscript files....).

i've attached an exemple of the effect i want
Please help
Thanks



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 03-04-2007, 05:59 PM


View Complete Forum Thread with Replies

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

This Is A Fix To The Image Gallery Tutorial - Makes It A Fully Dynamic Gallery
After searching and reading a couple of hundred post on the truly GREAT Kirupa image gallery tutorial - and wondering why nobody has written a new tutorial or at least updated the "old" one to avoid overloading the net with flash image gallery questions.

Im trying to create a new thread that will serve as a basic startingpoint for all Kirupa gallery questions. Im no überscripter nor do I know a lot about flash, but with a little common sense and perhaps some help from all of you... oh well - here goes:

Quick Checklist:

If your JPG's wont load - Make sure you don't save them as progressive JPG's, as they wont load in Flash.
If your images dont align to the photo container movieclip it is probably because your registration point of the photo MC is set to center instead of topleft.
Below is the code I have pieced together from different posts on the subject (I would like to credit all the authors, but that would require me reading all the posts again, as I have forgotten where I got them.

It produces a gallery that loads files dynamicaly thru a phpscript and checks for maximum image height/width and scales the images to fit within the photo MC. It also sets the center of the displayed images to a given coordinate (x,y).

All in all this is a install and forget image gallery, where the only maintaining required is uploading new pictures to the image folder.

On the server the file/directory structure is:
gallery swf
filearray.php
images/file_x.jpg
file_y.jpg
etc...

This is the filearray.php - modify this to check for files in the path set in the actionscript line: this.pathToPics = "images/";


PHP Code:



  <?php  if ($dir = opendir("images")) {    while (($file = readdir($dir)) !== false) {          $cont++;      if ($file == "." || $file == "..") { } else {              $string.= ($file);          $string.= "&";          }        }      closedir($dir);  }  print($string);  ?>





This is the modified actionscript from the original Kirupa gallery script:


ActionScript Code:
// This loads the array created by filearray.php and puts it into pArray   lv = new LoadVars();  lv.load("filearray.php");  lv.onData = function(text){  pArray = text.split("&");  for (i=0; i<pArray.length-1; i++) {  trace(pArray[i]);  }  }    // variables ------------------------------------------  // put the path to your pics here, include the slashes (ie. "pics/")  // leave it blank if they're in the same directory  this.pathToPics = "images/";  // fill this array with your pics (set from filearray.php)  this.pArray = pArray;            this.fadeSpeed = 20;  this.pIndex = 0;    // MovieClip methods ----------------------------------  // d=direction; should 1 or -1 but can be any number  //loads an image automatically when you run animation  loadMovie(this.pathToPics+this.pArray[0], _root.photo);    // Center the photo at (x,y) the coordinates are set in line 69  MovieClip.prototype.centered = function(x, y) {  this._x = x-this._width/2;  this._y = y-this._height/2;  };  // Makes sure that the image fits within (wMax, hMax)  MovieClip.prototype.resize = function(wMax, hMax) {  while (this._width>wMax || this._height>hMax) {  this._xscale = this._yscale -= 1;  }  };  // This line sets max width and max height (wMax, hMax)  photo.resize(397, 297);    MovieClip.prototype.changePhoto = function(d) {      // make sure pIndex falls within pArray.length      this.pIndex = (this.pIndex+d)%this.pArray.length;      if (this.pIndex<0) {          this.pIndex += this.pArray.length;      }      this.onEnterFrame = fadeOut;  };  MovieClip.prototype.fadeOut = function() {      if (this.photo._alpha>this.fadeSpeed) {          this.photo._alpha -= this.fadeSpeed;      } else {          this.loadPhoto();      }  };  MovieClip.prototype.loadPhoto = function() {      // specify the movieclip to load images into      var p = _root.photo;      //------------------------------------------      p._alpha = 0;      p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);      this.onEnterFrame = loadMeter;  };  MovieClip.prototype.loadMeter = function() {      var i, l, t;      l = this.photo.getBytesLoaded();      t = this.photo.getBytesTotal();      if (t>0 && t == l) {          this.onEnterFrame = fadeIn;          // This line sets the (x,y) center of the image on the stage          this.photo.centered(249, 213);      } else {          trace(l/t);      }  };  MovieClip.prototype.fadeIn = function() {      if (this.photo._alpha<100-this.fadeSpeed) {          this.photo._alpha += this.fadeSpeed;      } else {          this.photo._alpha = 100;          this.onEnterFrame = null;      }  };


This should do it - the only thing I (think) I need some help with is changing the script to actually load the FIRST image, when the gallery loads. For some reason beyond my knowledge you have to click the next button for a image to load... What part of the script needs to be changed to make sure that a image is loaded on startup???

I hope someone will take the time to help develope this gallery tutorial / help file... It would be great if you added som more steps to the quick checklist... and of course fixed the load image on start problem....

This Is A Fix To The Image Gallery Tutorial - Makes It A Fully Dynamic Gallery
After searching and reading a couple of hundred post on the truly GREAT Kirupa image gallery tutorial - and wondering why nobody has written a new tutorial or at least updated the "old" one to avoid overloading the net with flash image gallery questions.

Im trying to create a new thread that will serve as a basic startingpoint for all Kirupa gallery questions. Im no überscripter nor do I know a lot about flash, but with a little common sense and perhaps some help from all of you... oh well - here goes:

Quick Checklist:

If your JPG's wont load - Make sure you don't save them as progressive JPG's, as they wont load in Flash.
If your images dont align to the photo container movieclip it is probably because your registration point of the photo MC is set to center instead of topleft.
Below is the code I have pieced together from different posts on the subject (I would like to credit all the authors, but that would require me reading all the posts again, as I have forgotten where I got them.

It produces a gallery that loads files dynamicaly thru a phpscript and checks for maximum image height/width and scales the images to fit within the photo MC. It also sets the center of the displayed images to a given coordinate (x,y).

All in all this is a install and forget image gallery, where the only maintaining required is uploading new pictures to the image folder.

On the server the file/directory structure is:
gallery swf
filearray.php
images/file_x.jpg
file_y.jpg
etc...

This is the filearray.php - modify this to check for files in the path set in the actionscript line: this.pathToPics = "images/";


PHP Code:



  <?php  if ($dir = opendir("images")) {    while (($file = readdir($dir)) !== false) {          $cont++;      if ($file == "." || $file == "..") { } else {              $string.= ($file);          $string.= "&";          }        }      closedir($dir);  }  print($string);  ?>





This is the modified actionscript from the original Kirupa gallery script:


ActionScript Code:
// This loads the array created by filearray.php and puts it into pArray   lv = new LoadVars();  lv.load("filearray.php");  lv.onData = function(text){  pArray = text.split("&");  for (i=0; i<pArray.length-1; i++) {  trace(pArray[i]);  }  }    // variables ------------------------------------------  // put the path to your pics here, include the slashes (ie. "pics/")  // leave it blank if they're in the same directory  this.pathToPics = "images/";  // fill this array with your pics (set from filearray.php)  this.pArray = pArray;            this.fadeSpeed = 20;  this.pIndex = 0;    // MovieClip methods ----------------------------------  // d=direction; should 1 or -1 but can be any number  //loads an image automatically when you run animation  loadMovie(this.pathToPics+this.pArray[0], _root.photo);    // Center the photo at (x,y) the coordinates are set in line 69  MovieClip.prototype.centered = function(x, y) {  this._x = x-this._width/2;  this._y = y-this._height/2;  };  // Makes sure that the image fits within (wMax, hMax)  MovieClip.prototype.resize = function(wMax, hMax) {  while (this._width>wMax || this._height>hMax) {  this._xscale = this._yscale -= 1;  }  };  // This line sets max width and max height (wMax, hMax)  photo.resize(397, 297);    MovieClip.prototype.changePhoto = function(d) {      // make sure pIndex falls within pArray.length      this.pIndex = (this.pIndex+d)%this.pArray.length;      if (this.pIndex<0) {          this.pIndex += this.pArray.length;      }      this.onEnterFrame = fadeOut;  };  MovieClip.prototype.fadeOut = function() {      if (this.photo._alpha>this.fadeSpeed) {          this.photo._alpha -= this.fadeSpeed;      } else {          this.loadPhoto();      }  };  MovieClip.prototype.loadPhoto = function() {      // specify the movieclip to load images into      var p = _root.photo;      //------------------------------------------      p._alpha = 0;      p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);      this.onEnterFrame = loadMeter;  };  MovieClip.prototype.loadMeter = function() {      var i, l, t;      l = this.photo.getBytesLoaded();      t = this.photo.getBytesTotal();      if (t>0 && t == l) {          this.onEnterFrame = fadeIn;          // This line sets the (x,y) center of the image on the stage          this.photo.centered(249, 213);      } else {          trace(l/t);      }  };  MovieClip.prototype.fadeIn = function() {      if (this.photo._alpha<100-this.fadeSpeed) {          this.photo._alpha += this.fadeSpeed;      } else {          this.photo._alpha = 100;          this.onEnterFrame = null;      }  };


This should do it - the only thing I (think) I need some help with is changing the script to actually load the FIRST image, when the gallery loads. For some reason beyond my knowledge you have to click the next button for a image to load... What part of the script needs to be changed to make sure that a image is loaded on startup???

I hope someone will take the time to help develope this gallery tutorial / help file... It would be great if you added som more steps to the quick checklist... and of course fixed the load image on start problem....

Movie/anim Gallery? (not Image Gallery)
Ive come across this gallery and preloader

http://www.flashkit.com/movies/Scrip...7797/index.php

I love the way I can just dump my images in a folder and with a few tweaks it will put these images in the gallery.

What I am looking at is a way to do this with seperate .swf animations.

What I want to be able to do is dump a number of linear animation swf files into a folder, then when I launch the gallery, the first animation plays, and when it reaches the end it automatically plays the next animation in the folder. Then I want the whole thing to loop.

Any ideas?

XML Gallery - Generate XML Path For Image Gallery
I learned from great tutorial of kirupa .
I tried to create own image gallery, now I stay in front of problem.
How can I generate path for my images and thumbnails for XML file.
E.g. I have 110 images paths and 110 thumbnails path.
Manually takes it lot of time , how can I make this code for XML file?


<pic>
<image>images/img/ref/img/img_001.jpg</image>
<thumbnail>images/img/ref/thm/img_001.jpg</thumbnail>
</pic>

next node, next node,
...
last node:

<pic>
<image>images/img/ref/img/img_110.jpg</image>
<thumbnail>images/img/ref/thm/img_110.jpg</thumbnail>
</pic>

Product Gallery, Image Gallery Or Portfolio..
Hi! This is probably insanely much to ask for but I do it anyway This is for us designers that want to learn some action script to help us show some xml driven data in our flash projects.

I’ve been searching the web for tutorials that can help me with a specific project that I want to develop. I’ve found a bounce of things that is close to what I’m looking for but not right on the spot. And I think that there are many out there that are looking for the same tutorial as I am. For me the best way to learn is to deconstruct example files with code hints. So if any of you flash gurus out there could help us with an example .Fla for this project I think many would be very happy!

The project:
I want to create a gallery of “what ever”. It could be a product gallery, image gallery or a portfolio. This can be used for many things. I’ve attached an image (template.jpg) that pretty much explains what I’m looking for. I also included an example of how the xml file could look like.

I think this could be an excellent example for many designers/developers that are new to dealing with xml, images and flash.

Kirupa Picture Gallery / Keeping The Image On Stage As New Image Loads
Hi, I have the Kirupa Image Gallery implemented and it works great. But I was wondering how I can go about having the image stay on screen as it is loading the next image, so it's not such an abrupt transition. Currently the image container goes blank as it loads the next image. I assume I will need another image movieclip that sits underneath the first one... but then what?

Thanks!

Simple Gallery Example Flash With PHP Serving Image List And Image Sizes
this is simple gallery example for AS2
gallery is nothing special ease to use and implement

interesting thing about this example is that you pass a folder, and PHP side gathers images list from folder and returns it to Flash in XML form together with images widths and height which makes it more easier to implement this sort of galleries like I've made

example : http://www.hagane.us/as/gallery/
ZIP : http://www.hagane.us/as/gallery/gallery.zip

blogpost : http://mrsteel.wordpress.com/2008/01...s-from-folder/

Seeking Flash Image Gallery That Resizes Movie To Fit Image Dimensions
I am looking for a flash gallery that resizes the movie dimensions to fit the width and height of the image in real-time. Alternatively, the movie does not display a background color or border. I've used slideshowpro and it's feasible ...just looking for another suggestion. Prefer xml-based.

Image Streching For Unknown Reason In Dynamic Image Gallery
Hi everyone, this is my first time using flash.

I followed a tutorial at http://www.lukamaras.com/tutorials/a...e-gallery.html and everything is working okay, except when I view the big images they are 4x wider than they should be, stretching to the right. I think its a problem with action script maybe because I'm using cs3, and saving the file as flash 8? I'm not sure. I've included the file and the xml/photos it references in case anyone is nice enough to check out my problem.

http://www.mediafire.com/?euw1wywgnvg

Thanks! -mike

Actionscript Image Gallery > Updating Thumbnail And Main Image
Hi all,

I'm helping a friend produce a small Flash website. For some artwork/photos.

Basically a strip of thumbnail images at the bottom, clicking a thumbnail will load the (fullsize) image above.

Currently ten thumbnails scroll across.

**The problem**

.. is he wants to be able to drop a thumbnail image and the corresponding fullsize image into a folder on the server. The Movie should then display the latest additions. I can produce a simple slideshow where extra images are loaded at run-time (MX introduced this). But am trying to figure out how to update both the thumbnail strip and the main image.

Any help/pointers greatly appreciated.

Robert

XML Gallery: Preload On Current Image/cross-fade Image
Hello,
I am new to action script but I am learning quickly.

I took the following tutorials and made a hybrid:
Photo Gallery Using XML and Flash
Photo Slideshow Using XML and Flash


I redesigned the interface and created this:
http://www.onarresdesign.com/greg/work2.html

Everything works great, but now I want to take it further than the tutorial.
I am trying to make the images cross-fade. I am open to any suggestions and I have tried many techniques with little success.

Here is the closest solution steps I have come up with:

Code:
1) First image preloads (grey background showing)
2) First image loaded into top level MC 1
3) First image fades in
4) First image in top level MC 1 remains visible
5) First image gets loaded into bottom level MC 2 behind current movie clip.
6) Top level MC 1 clears because its preloading next image
Bottom level MC 2 remains visible
7) Preloader shows on top of bottom level MC 2
8) Next image is loaded into top level MC 1
9) Next image fades in (cross-fade effect achieved because previous image is behind it)
10) Next image gets loaded into bottom level MC 2
Repeat process
I can't get the action script to do what I want. I have off set the moveclips to show that the images are loading into both movieclips. I currently have the 'nextImage()' function controlling this so it is understandable the both images are cleared because the function is loading new images into the movie clips at the same time. How do I get one movie clip to remain constant while the other is loading? It seems to be a matter of where the function is placed. Or so I think.

I would appreciate any help I can get on this. If would also appreciate any suggestions for making the code for the control buttons cleaner.

Thank you,
</asla>

Rollover Image Gallery With Swap Image Effect?
I'm trying to do a flash banner like the one from:

http://www.eyeblaster.com/

when you rollover the buttons that say: eyeblaster ACM v2.0, advanced analytics, etc. the nice artistic banner appears. when you are no longer over it, it still stays to that same banner until you rollover the other buttons. so it's like a swap image effect, only in flash.

how would i go about this?

Photo Gallery Rollover Image Image Swap
I am using the XML Photo Gallery with thumbnails, and i have managed to modify it to suit my needs for the most part. However, some of the work i want to use it to display is photo restoration and i would like to be able to rollover the image and have a different image show on rollover. Something like you see here...http://homepage.mac.com/gapodaca/digital/bikini/ only using the XML Photo Gallery.

Any ideas?

Image Gallery... Save Image To Computer?
Hey all,
I just wondered if there was a way to save image files in a dynamic gallery? For example... when an image is displayed, a little save icon appears that allows the user to save the jpeg file to their computer. Thanks!

XML Image Gallery: Replacing Xml To Load New Image Set?
Hi Kirupa crew!

First, big thanks for this great site!

Second, I'm struggling a bit on xml and hoping for a hand. Your xml image gallery is a sweet piece of work, and I would like to be able to add the functionality of being able to load different galleries from a menu without loading a new mc with gallery inside it. I managed to botch the file up pretty good on my own, and was wondering if there is a ready answer nearby.

So I'm thinking have but1, but2 and but3, with a seperate xml file for each. What would you recommend for a smooth way to swap the the xml files to the gallery, and load the first image of the new xml file? Also, can it be done with one big ol' xml file while keeping the galleries seperate? It's not necessary, but could be handy, and save some loading.

It would also be interesting to apply the same principle to the resizing script that Scotty has in that big Resizing thread, just a thought.

Many many thanks!
John

Gallery Image Loading - Getting Image Width..help
Ladies and gents:

having a problem with my code somewhere; I'm stumped. Here's what i'm trying to do:

-When you click on a thumbnail in my gallery a load bar appears that is the width of the loading image
-While the image loads the load bar scales from full width to zero
-Once it finishes loading the image fades in
-Click on a new thumbnail, and the old image fades out, then the scrollbar is supposed to take the width of the NEW image and do the same thing

What is happening is that the scrollbar width does not set itself to the new image size until i click the thumbnail a second time...try this link to see what i mean. it's on the "portfolio" page.

http://www.lewisweb.ws/staging

here's the code:



Code:
//CONSTANTS
frame_x = 387; //the exact x coordinate where the box originates
frame_y = 184; //the exact y coordinate where the box originates
alphaSpeed = 5; //spped at which the pics fade in

//INITIAL SETTINGS
containerMC._alpha = 0;
containerMC._x = frame_x;
containerMC._y = frame_y;

//Fades in a picture loaded externally
MovieClip.prototype.loadPic = function(pic){
containerMC.fadeOldPic(); //fade out old picture
containerMC._alpha = 0;
this.loadMovie(pic); //load new pic
var loadIsComplete = false; //reset load checker
var w = containerMC._width;
loadBar._width = w; //set loadbar to new movieclip width
loadBar._alpha = 100; //make loadbar opaque
_root.onEnterFrame = function(){
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
loadIsComplete = (Math.round(l/t) == 1); //check to see if load completed
loadBar._width = w - ((l/t) * w); //sets width of loadbar dynamically
if (loadIsComplete){
containerMC._alpha += alphaSpeed; //if load is complete, fade pic in
}
//if the load is complete and the picture is fully faded in...
if (t != 0 && loadIsComplete && _root.containerMC._alpha == 100){
loadBar._alpha = 0; //make the load bar disappear
delete _root.onEnterFrame;
}
}
};

//Fades out an old picture...pretty self explanatory
MovieClip.prototype.fadeOldPic = function(){
_root.onEnterFrame = function(){
_root.containerMC._alpha -= alphaSpeed;
if (_root.containerMC._alpha == 0){
delete _root.onEnterFrame;
}
}
};

containerMC.loadPic("portfolio/westin.jpg");
stop();
ANY help will be appreciated!

Kirupa XML Image Gallery - Skip To Image
So I'm having some trouble modifying this script. I have a text box so a user can go to a certain image (In my case page). So if the user type 5 it should go to image 5.

I've tried numerous methods, none of which are working (they work but then my next and previous buttons aren't working properly). I know I need to just get go to the number image in the array but the way the script is set up it seems I would have to change the current position value but that doesn't seem to be the case.

Am I over complicating this?

ActionScript Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("xml/config.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++;
picture._alpha = 0;
picture.loadMovie("images/"+image[current_pos]+".jpg", 1);
picture_num();
}
}

function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie("images/"+image[p]+".jpg", 1);
picture_num();
}
}

function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie("images/"+image[0]+".jpg", 1);
picture_num();
}
}


function picture_num() {
current_pos = p+1;
_root.currPageNum.text = "Page " + current_pos;
}

_root.goButton.onPress = function(){
// load the image typed into the text area.
}

Flash 8 - Help W Xml Image Gallery, Thumbnails For Each Image
Hey.

New here and have found some really good tutorials! Thanks.
I desperately need a bit of help with some Actionscripting if anyone has any ideas how to do this?
I have created a photo gallery using the kirupa tutorial. That works fine. Now for each main image that the code cycles through my client wants 1-3 thumbnails to display on the side of the image and they should all be clickable and display full size in place of the main image when clicked. The previous and next buttons should still only go through the main images. Here is the xml code (as I imagine it should look like):

[code]

Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>images/bowandkey_main.jpg</image>
<caption>Bow and Key Necklace: £225.00</caption>
<description>Mother of pearl (or onyx) necklace with silver-plated bow and key, cast from vintage originals </description>
<thumbnail>
<thumb1>thumbnails/bowandkey_main.jpg</thumb1>
<thumb2>thumbnails/bowandkey_portrait.jpg</thumb2>
<thumb3>thumbnails/bowandkey_closeup.jpg</thumb2>
</thumbnail>
</pic>
<pic>
<image>images/bowandkey2_main.jpg</image>
<caption>Bow and Key Necklace: £230.00</caption>
<description>Onyx necklace with silver-plated bow and key, cast from vintage originals </description>
<thumbnail>
<thumb1>thumbnails/bowandkey2_main.jpg</thumb1>
<thumb2>thumbnails/bowandkey2_portrait.jpg</thumb2>
</thumbnail>
</pic>
<pic>
<image>images/crossedfingers.jpg</image>
<caption>Crossed Fingers Necklace: £150.00</caption>
<description>Solid silver crossed fingers good luck charm, cast from 1940s celluloid gumball toy, strung on mother of pearl or onyx beads.</description>
<thumbnail>
<thumb1>thumbnails/crossedfingers_main.jpg</thumb1>
<thumb2>thumbnails/crossedfingers_closeup.jpg</thumb1>
</thumbnail>
</pic>
</images>
The thumb 1,2 and 3 are childNodes of thumbnail.

I have created a MovieClip holder to hold the thumbnails. Could someone please show me how to add to the Actionscript so that it loops through (displays) the thumb1 - thumb 3 for each main image? I suppose I would have to store the thumbnails for each image in separate folders so the flash can determine the length of the array of thumbnails for each image? And then make them clickable.

I am pulling my hair out here not getting this working... Any hinters on what to do would be greatly appreciated!

Here is the actionscript code for the image gallery:


Code:

function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
caption = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
caption[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
}
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();
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);
cap_txt.text = caption[p];
desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
cap_txt.text = caption[p];
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
cap_txt.text = caption[0];
desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
Thanks!!

XML Image Gallery: Replacing Xml To Load New Image Set?
Hi Kirupa crew!

First, big thanks for this great site!

Second, I'm struggling a bit on xml and hoping for a hand. Your xml image gallery is a sweet piece of work, and I would like to be able to add the functionality of being able to load different galleries from a menu without loading a new mc with gallery inside it. I managed to botch the file up pretty good on my own, and was wondering if there is a ready answer nearby.

So I'm thinking have but1, but2 and but3, with a seperate xml file for each. What would you recommend for a smooth way to swap the the xml files to the gallery, and load the first image of the new xml file? Also, can it be done with one big ol' xml file while keeping the galleries seperate? It's not necessary, but could be handy, and save some loading.

It would also be interesting to apply the same principle to the resizing script that Scotty has in that big Resizing thread, just a thought.

Many many thanks!
John

Image Gallery - Image Width
Hi,

I'm putting an image gallery together with all the pictures at the same _y. Here's my AS code:


a = 1;
pushOverX = 0;
var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function(success:Boolean) {
if (success) {
while (a<100) {
slider_mc.attachMovie("holder", "holder"+a, a, {_xushOverX, _y:0});
set("slider_mc.holder"+a+".load_var", eval("this.data"+a));
a = a+1;
pushOverX = pushOverX+100;
if (eval("this.data"+a) == undefined) {
break;
}
}
}
};
my_lv.load("load_in/image_data.txt");


All that works fine. However, I would like the images to be placed on the _x axis according to the width of each previous image instead of relying on pushOverX = pushOverX+100;

At the moment, an image is placed every 100px, but if an image is 50, I want the following one to be placed 50px after it and not fixed at every 100px.

Has anybody got an idea?

Thanks

Help- How To Load First Image From XML Image Gallery
Hi-
Help- I'd like to making the first image load onto movie. Attached is the code. Any hints would be awesome.

myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
//portfolioTag = this.firstChild;
numimages = this.firstChild.childNodes.length;
spacing = 70;
for (i=0; i<numimages; i++) {
picHolder = this.firstChild.childNodes[i];
thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
thumbHolder._x = i*spacing;
thumbLoader = thumbholder.createEmptyMovieClip("thumbnail_image" , 0);
thumbLoader.loadMovie(picHolder.attributes.appthmb );
thumbHolder.app = picHolder.attributes.app;
thumbHolder.appdesc = picHolder.attributes.appdesc;
thumbHolder.appmain = picHolder.attributes.appmain;
thumbHolder.onRelease = function() {
loader.loadMovie(this.appmain);
app_txt.text = this.app;
appdesc_txt.text = this.appdesc;
};
}
};
myPhoto.load("appphoto.xml");

XML Image Gallery Image Resize
I just got through with the XML image gallery tutorial that Kirupa made. First of all, I would like to thank him for it -- a great tutorial.
I am in the process of modifying the tutorial file to suit my needs, and I have come across a problem:
There is an empty movie clip with the instance name "image" that controls where the images from the XML flie are showed in the SWF. The empty movie clip "node" or placeholder aligns itself to the top left-hand corner of the images file. For my gallery to funciton correctly, I need the node to be aligned to the center of the image files, so I can display pictures of different aspect ratios and alignments. I will try and post a file on the internet some time today to demonstrate this if I am unclear with my explination. Thanks in advance!

XML Image Gallery - Setting X,y Of Image Via XML?
I'm working on version of Kirupa's XML Image Gallery, only I want to be able to set the x,y coordinates individually for each image. How do I do this via the XML.

I'm trying this to no avail:
XML looks like this:

<pic>
<image x="0" y="0">001.jpg</image>
<caption>description line 1</caption>
<caption2>description line 2</caption2>
<caption3>description line 3</caption3>
</pic>

<pic>
<image x="100" y="200">002.jpg</image>
<caption>description line 1</caption>
<caption2>description line 2</caption2>
<caption3>description line 3</caption3>
</pic>

Actionscript looks like this:

function placeImage() {
var image_x:Number = Number(picture.attributes.x);
var image_y:Number = Number(picture.attributes.y);
}

Can anyone let me know what I'm doing wrong, what I'm missing?
Or how better to go about this?

Thanks!

Centering Image In The Xml Image Gallery...
did the tutorial on this site for an xml image gallery - it worked great... My question would be is there a way to accomodate for multiple image sizes that would allow the image displayed to be centered?

Thanks!

Image Sizing In Image Gallery
I have used the Kirupa xml flash photo gallery at this link (code below) http://www.kirupa.com/developer/mx20...togallery9.htm

i was wondering how do i change the code so that the pictures can be different sizes... and where would the new code fit in to what i have already got from the tutorial?


function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
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;
}
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();
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;
}


thanks

cazwalks

XML Image Gallery Image Resize
I just got through with the XML image gallery tutorial that Kirupa made. First of all, I would like to thank him for it -- a great tutorial.
I am in the process of modifying the tutorial file to suit my needs, and I have come across a problem:
There is an empty movie clip with the instance name "image" that controls where the images from the XML flie are showed in the SWF. The empty movie clip "node" or placeholder aligns itself to the top left-hand corner of the images file. For my gallery to funciton correctly, I need the node to be aligned to the center of the image files, so I can display pictures of different aspect ratios and alignments. I will try and post a file on the internet some time today to demonstrate this if I am unclear with my explination. Thanks in advance!

Image Gallery
Hi

I want to make an Image gallery with 5 pictures and each one can be accessed via a NEXT and BACK button...

The image should move forward slowly when next button is hit and role back slowly when previous button is hit...

can anybody help me please



Thank You
Dhaval

Image Gallery
Yes I am a newbie, not ashamed of it. We've all been one before.
I am trying to use the PhotoScroller 1.0 (http://www.flashkit.com/movies/Interfaces/Navigation/Photoscr-Barry_Dr-6066/index.php)as an image gallery. I would like to launch a picture of the thumbnail as a larger image below the scrolling navigation.

What is the best way of accomplishing this? Also is there another movie that you might suggest that would give me the same results?

please no smart comments. I already feel vulnerable...
Also please be as specific as possible.

All replies are greatly appreciated.
Thanks in advance

Image Gallery
Hi,
I'm looking to put a selection of travel photography on my site and wanted to use flash to add a nice transition between each image - nothing groundbreaking really - I just plan to change alpha levels, so that one image fades into the other when the user clicks next/previous buttons.

My issue concerns how best to structure the gallery, as I am aware that file size will be a concern - obviously a collection of about 40 photos is going to be quite large for dial-up users.

I'm guessing the best way to arrange the photos would be as individual movie clips containing one or two photos, which can then be loaded into a blank holding movie using the loadmovie command attributed to the appropriate next/previous button.

The only problem though is how I then animate the transition between each photo, because i don't know how to make one movie clip fade out while the other fades in - I'm not too hot with actionscript...does anybody have any suggestions/ideas?
Cheers,

Elastikman

Image Gallery
Hello
I am trying to create an image gallery. Could anyone point me to some FLA's or Tutorials?

Thanks

Image Gallery?
hey -.. im designing a site that is basically about showing pics of people hanging around. so... what software do you recommend for creating pics galleries... or can it be done in flash, to be easilyupdated and low bandwith?

Image Gallery (PLEASE HELP ME :) )
HI there I am currently working on a site for a Soul Singer, and he wants an image gallery in the site. So what I would like to do is this,



Each of the little file icons will load an image from a folder within the site directory called pics and show this in the space above the grey line. At the same time underneath the line there is a dynamic text box which would load up a description of that image and the date it was taken from a text file in the "pics" folder. So lets run that by everyone once again.

Click button, load image from "pics" into space above the grey line and load text from text file into text field underneath the grey line.

Simple? I don't think so, if there is anyone who would be generous enough to spend 30mins talking me through the code to put this together I would be very gratefull, I want to learn how actionscript works so I can make myself usefull round here and help others instead of askin Q's all the time

Cheers

Studentmonster

Image Gallery & More
http://www.kirupa.com/developer/mx/photogallery.htm

I love this galley script to death. How could I make it so that when I click on the image it opens a new window with a full size version?

Thanks!,
WebScud

Image Gallery
On the site that I am currently working on there has to be an image gallery. What I want to make is a small gallery with three parts to it. The first is a section of thumbnails of all the images in the gallery. The second part is a space where the image cosen will apear in a larger size. And the third section will display some text about that image loaded from an external text file.

How can I make the large image appear when the thumbnail is chosen and how do I load the text into a box underneath the image?

Here is a snapshot of the layout:

Studentmonster

Thanks very much in advance

Studentmonster

Image Gallery
well, hey everyone I want to create a flash image gallery, easy to update... , because I need to make image albums like twice a week, it would be nice only to upload images to folders... or something.. ? , can this be done in flash?

Image Gallery
I'm loading images into Flash MX using getURL. But i want to use a preloader before all the image show by using getbytesloaded/getbytestotal. For some reason its not working anyone have a clue? the images will load into the movie but i can get the preloader to wait until the images load before showing the movie?!

here's the code im using.

if ( viewer.getBytesLoaded() == viewer.getBytesTotal()) {

gotoAndStop("Scene 2");

Looking For An Image Gallery .fla
Does anyone know or have tried any image gallery .flas, something just like ImageVue (http://www.imagevuex.com/) only different.

Just looking for alternatives to try, dont necessarily need to be free, but need to be easy to add pics to.

Ta

Image Gallery PLUS
This is doing my nut in!! I havent much experience with any type of coding but I dabble a bit. Any help is greatly appreciated.

I have downloaded a flash gallery file, which I think is excellent. Its made up of mostly code.

When you click on a thumbnail, it then opens up the larger image, in the flash window.

I would like to add a bit of code that will allow me to click on thumbnail that opens up a the larger image, then click on the larger image that opens up the full size image in separate html browser window which has no borders. Or if this isn’t possible clicking on the larger image, allows you to download the full sized image.

The folder structure is like this:

Thumbnails
Conatins the thumbnail images of the main image. With same reference name

Images
Contains the main image that is opened up when the thumbnail is clicked.

So the full sized image could be in a separate folder called “full size”

Any ideas?

You can download the source fla file here to see what I mean. You have to view it in the html page:

http://www.eideteker.com/downloads/...20prototype.zip

Image Gallery
Hi ya all.
My problem is that I have external images loading into
a MC with the same size but when they get loaded the image changes size??? Can't get it to work, I have had the suggetion to load swf's but you must be able to do such a simple thing as load an image right?
By the way I'm not a webdesigner so have patients if this is a crap question....

Image Gallery
Hiya,

ive looked through various posts but cant really find what im looking for.

im trying to make a navigation that is actually similiar to that of http://www.dieselmarketing.com .

like, does anyone know what method they use for the larger images that are displayed, as in they change to the next one after a few seconds of being displayed, adn they fade in and out as well.

coz i need this for a site im creating, but dont really want to have to make the fade ins/outs manually on a timeline, because surely this is impractical?

if anyone could help that would be great. thanks in advance.

Iain
iduff@grdata.co.uk

Image-gallery
hi everyone! I have a big problem! I need a image-gallery for my homepage and have found a wonderful one, my problem is that this flash-gallery works only with arthward images ... I have lots of problems with understanding the actionscript and would be grateful if someone of you could help me! I have attached the actionscript!

thanks
Nadine

Image Gallery
hey,

for my site, i need a little image gallery kind of thing, and i want it to be done in actionscript, but i cant seem to figure out how i should go about doing it.

my idea is that i have this picture, and when you click it, it will fade out and another picture will fade in, and so on so that it loops..

can anyone help me?

Image Gallery
hi --

i've got 5 images. i want the following things to happen:

1. the placeholder movie clip automatically tweens to adjust to the image's dimensions.

2. the transition between each image is a la: www.barbariangroup.com -- front page when you enter

3. the images stay on the screen for approx. 5 seconds each.

any ideas on the best way to put this together?

thanks. fumeng.

Image Gallery
i'm a bit new to designing websites in flash but i'm a very quick learner. i am trying to set up an image gallery with thumbnails that open larger sized versions to the right when clicked ( see http://www.joecurrenphotography.com to see what i mean in his gallery section). does anyone know how to do this? or if there are any tutorials on it? all i can find on image gallery tutorials on the web are pre-made slideshows that don't fit to what i need. thanks.

Image Gallery
Hi there!

I'm trying to build a flash site where I want the images to change whenever a visitor enters the main page.

I've got the images in the same folder as the flash movie and has given them numbers to ease the naming job (1,2,3 etc)

Can anybody please help me out?

Image Gallery
I have downloaded a photo gallery tamplate from this site that loads your images via script into 12 "boxes." The problem is, the boxes distort the image, I can't figure out how to do this on my own and have the image load in its original proportions. Any help is appreciated, as I am very new to Flash. THanks.

Image Gallery - How Do You Do This?
Hi All
newbie here so be gentle.

Using Flash MX, trying to see how this site is using the swipe effect (the image collection section):

http://www.hillpeppard.com

The only tutorial I have found is here: http://www.cbtcafe.com/flash/masks_wipes/masking.html

But if I were to use that method, then the loaded image needs to be moved from layer one to the layer above it for the swipe to work, and my AS isn't that good! Any ideas/pointers to other tutorials?

TIA

Image Gallery XML
Hi, I'm trying to set up the combobox image gallery component from www.mr10.net/components/gallery/ (under "info") and am running into a problem that I can't figure out. The Comment textbox at the bottom of the movie works fine when the movie is by itself, but when I try to load it into another movie with

blankmovieclip.loadMovie("gallery/galleryComboboxDemo.swf");

The comment bar stops working. The titles under the thumbs keep working, but the comment bar doesn't. Does anybody know why this might be? If so, how can I fix it? Thanks a lot.

Image Gallery
Hi i was wondering if anybody knew how to make a horizontal image menu that moves the images with the mouse and when you click on a image it blows up to full size.

Image Gallery
hey guys,

I want to create an image gallery that where people can send in photos etc.

In other words I want to have a functioning gallery with thumbnails thats load to a bigger picture the big pic has a link to the image. while keeping it easy for me to update..(i suppose dynamicly loading thumbs etc?

suggestions?

cheers
vamps

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