Kirupa's Photo Album

Ok, I went to this:
http://www.kirupa.com/developer/mx/photogallery.asp

And did EVERYTHING it said … .like changed the picture links, made the movie and all, but when I go to test it, the only thing that shows up is the buttons(arrows) Not the photos.

Can someone please help me and tell me what am I doing wrong? I went over it again and again, and to me everything seems right, it just doesn’t show? :evil:

did u set the images paths and names correctly?

Seems like a lot of people is having problems with this tutorial, I just finished helping someone else with this tutorial earlier today. Here’s the link to that thread. Hope it helps. =)

http://www.kirupaforum.com/showthread.php?s=&threadid=9818

Yup, I did the image paths and all correctly!

Thanks electro-geek, I’m going to post the file in that thread :slight_smile:

Actully, Electro-geek, is it ok if I have your email address or if you have AIM or something?

Because I don’t want to post my pictures online, sorry.
Please let me know, I really do want the help, I fixed the photo problem, it was that Progressive thing, but there is something else wrong now… the photos it self is at the bottom of the screen …?

please reply back! Thanks

I’m not at home right now so I cant sign on AIM, how about you private message me the link to the file so I can download it and take a look at it.

Here you go, I fixed your fla. Your image was aligned in the botton right corner because your registration mark of your movieclip was in the center, it needed to be in the upper left corner. Here’s the fla, I didnt attach the image though, just the fla file.

wow, that is amazing! Thank you so much

Can I ask you another thing?
With those pictures you saw… I wanted to make a black border around each photo, I did in Photoshop, but once I put it into Flash, it doesn’t show up … Should I add a border in the flash itself? Or just make a thicker border in Photoshop so that it will show up in Flash … ?

You can add the border in photoshop which will increase the image’s width and height, just remeber to also increase the width and height of the movieclip in flash that the images load into. Make sure they match exactly. Hope that helps. =)

Hey Electrongeek, seems like you are the prof. at the moment. I too have a prob. My prob is perhaps the directory location. My images are saved in a folder called “bm”, which is nestled inside another folder called “flash”. “Flash” is inside the “My documents” folder.

So how do I go about directing the actionscript into the “bm” folder that holds the images? Does that make sense?

Thx for the knowledge:)

*Originally posted by tru *
**Hey Electrongeek, seems like you are the prof. at the moment. I too have a prob. My prob is perhaps the directory location. My images are saved in a folder called “bm”, which is nestled inside another folder called “flash”. “Flash” is inside the “My documents” folder.

So how do I go about directing the actionscript into the “bm” folder that holds the images? Does that make sense?

Thx for the knowledge:) **

hahaha I’m far from a “prof”, as a matter of fact, I’m a newbie! =) First off, have you gone through the photogallery tutorial on this site? If not then here’s the link, it will show you how to link your images.

http://www.kirupa.com/developer/mx/photogallery.asp

I have gone through it. I am only getting the buttons in swf. I can’t remember the whole directory thing.

Place all your images in a folder called “images” and place that folder in the same directory with your swf file. Then use the actionscript below, remember to change the names of the images in the array accordingly to what your images are named.


//Code written by sbeener (suprabeener)
/*
   i wrote this code, but you can use and abuse it however you like.
   the methods are defined in the order which they occur to make it
   easier to understand.
*/
// 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
this.pArray = ["image0.jpg", "image1.jpg", "image2.jpg", "image3.jpg", "image4.jpg", "image5.jpg", "image6.jpg", "image7.jpg", "image8.jpg", "image9.jpg"];
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);
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;
	} 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;
	}
};
// Actions -----------------------------------------
// these aren't necessary, just an example implementation
this.onKeyDown = function() {
	if (Key.getCode() == Key.LEFT) {
		this.changePhoto(-1);
	} else if (Key.getCode() == Key.RIGHT) {
		this.changePhoto(1);
	}
};
Key.addListener(this);

EG, I finally got it! I was trying to use images that I saved as .gif. Even though I wrote in the script [“images.gif”,…] it didn’t work. Thus, I brought in a jpeg file and voila! Thx for the reply. I’m sure your knowledge will be needed again soon;) have a good evening.

-tru

np =)